TCB() Function - Task Control Block
Syntax
TCB(int{,ERR=lineref})
Description
For BBj-specific information, see the TCB()
Function - BBj.
The TCB() function returns information on the current state of the application.
TCB(int) |
Return Value |
0 |
!ERROR=20. |
1 |
!ERROR=20. |
2 |
!ERROR=20. |
3 |
0 (not currently in use). |
4 |
Current line number. |
5 |
Line number of statement to retry on error. |
6 |
Current SETESC value. |
7 |
Current SETERR value |
8 |
Current "return" address; line number of return address, or "top" of current looping command (zero if no active loop or subroutine call). |
9 |
0 (not currently in use). |
10 |
Last host error (see note below). |
11 |
Last channel reporting error |
12 |
Last channel used |
13 |
Current public program depth |
14 |
|
15 |
Current START size. |
16 |
Length of string matched by MASK() function. |
17 |
User-defined function depth. |
18 |
Last CPL() depth. |
19 |
One or more flags
indicating how an ESCAPE was generated. |
20 |
File system information, in a 4-byte integer: $01$ Data Server access is available. |
NOTE: The TCB(10) returns the last error code reported by the host. If the value returned is negative, the absolute value of the TCB(10) indicates the operating system error. See TCB() for the specific system in the Installation and Configuration Guide. PRO/5 errors do not modify the TCB(10). Interrupting a program will generally modify the TCB(10).
Examples
2010 READ (2,ERR=9100)A$
…
9100 PRINT "ERROR AT LINE",TCB(5)