PGM() Function - Get Program Text
Syntax
PGM(int{,ERR=lineref})
Description
For BBj-specific information, see the PGM() Function - BBj.
The PGM() function returns the compiled form of a specified line from the current workspace program. PGM() is commonly used in conjunction with the LST() function.
Parameter |
Description |
int |
Program line
number.
|
ERR=lineref |
Branch to be taken if an error occurs during execution. |
NOTE: If PGM() is used to get program lines in a public program, it returns the appropriate compiled format from the workspace program, not from itself.
Examples
>LET PGM$=PGM(10)
PGM$ returns the compiled format of statement 10.
>LIST
0010 PRINT LST(PGM(10))
>RUN
0010 PRINT LST(PGM(10))