PGM() Function - BBj
For this topic's original documentation, see the PGM() Function - Get Program Text.
BBj-Specific Information
Syntax
PGM(int[,int])
In the above syntax, second int indicates a program level in the range
0 through TCB(13).
In BBx, the CPL(), LST()
and PGM() functions expose the internal structure of the compiled program.
BBj implements these functions in a way that does not expose internal
implementation details.
In BBj, the PGM() function returns the listed version of a specified line
from the current workspace program. In BBx, the PGM() function returns
the internal compiled form.
Parameter |
Description |
---|---|
int |
PGM(-1) unchanged from BBx PGM (-2) unchanged from BBx PGM (65536) has no special meaning in BBj |
Additional notes:
-
PGM(linenum,level) returns the listed version of a specified line from the program at the specified level, where level is in the range 0 through TCB(13).
-
PGM(linenum,0) is equivalent to PGM(linenum) and returns linenum from the workspace program.
-
PGM(-1,level) or PGM(-2,level) returns the name of the program at the specified level. PGM(-1,0) returns the name of the workspace program. PGM(-1,TCB(13)) returns the name of the current program.
-
PGM(linenum,TCB(13)) returns linenum from the current program.
Example
|
Example 2
|