Add new dot variables .LINENO and .LOCATION in compiler edit 792:
• | .LINENO returns the last line number, similar to err(1) except without requiring an error. Not to be confused with the dot function .LINENO(ch) (which returns the physical line # since the last page break in the output file open on the specified channel). |
• | .LOCATION returns the current program location counter, i.e. the offset in bytes from the start of the current program (RUN, LIT or SBX) to the current statement position. Note that the location counter is generally represented in hex (as it appears in the LSX files created by the compiler /LF switch), so you would probably want to print it using the SOSLIB function Fn'Dec2Hex(.LOCATION). |