ERRBUF
Error Buffer
This system variable returns a string containing error conditions encountered when a program with formats and data names was compiled ( SAVEd ).
Syntax
Section titled “Syntax”ERRBUFRemarks
Section titled “Remarks”The format of an entry in the error buffer is as follows:
- statement number ( 2 bytes )
- the error condition ( 2 bytes )
- length of the format/data name ( 1 byte )
- the format/data name ( n bytes )
Statement number 0 ( $0000$ ) signals the end of the error buffer.
Statement number 65535 ( $FFFF$ ) signals that the error buffer reached capacity during the compiling ( SAVEing or FIXUP ) of a program.
The error buffer is cleared out every time a program is SAVEd.
Examples
Section titled “Examples”The following program prints the contents of an error buffer:
00010 REM "PERRB - FORMATTED ERROR BUFFER PRINT"01000 E$=ERRBUF, L=STL(E$), STMT=0, ECOUNT=0, P=1; PRINT "Invalid format/data name references:";
WHILE P<L-2; S=DEC($00$+E$(P,2)), P=P+2; IF S<>STMT STMT=S; PRINT 'LF',@(4), "Statement number ", STR(STMT:"00000") FI; E=DEC($00$+E$(P,2)); P=P+2; N=DEC($00$+E$(P,1)), P=P+1; N$=E$(P,N), P=P+N;
PRINT @(8),"Error condition ", STR(E:"000"), " detected for ",N$; ECOUNT=ECOUNT+1; WEND; PRINT 'LF',"Total number of errors detected: ", ECOUNT; IF E$(P,2)=$FFFF$ PRINT "Program contains more errors ... ", "correct and SAVE again" FI09000 ENDSee also
Section titled “See also”From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF