| System Functions |
|
| Format |
|
|||||||||||||||||
| Returns | String, program line number (characters 1 to 5) plus full pathname. | |||||||||||||||||
| Format 1 | Format 1 of the STK( ) function returns a character string reporting the program line number (5 digits) and program (full pathname) being executed at the program level specified. Use a negative value to specify a level that is relative to the current level. ProvideX returns an Error #41: Invalid integer encountered (range error or non-integer), if your given level does not exist. | |||||||||||||||||
| Example | The
current directory is "/usr/test". In program
"PROG1": 0100 CALL "STACKER" In program "/usr/test/STACKER" 0010 PRINT "Level 1=",STK(1) 0020 PRINT "Level 2=",STK(2) 0030 PRINT "Level -1=",STK(-1) When run: Level 1=00100/usr/test/PROG1 Level 2=00020/usr/test/STACKER Level -1=00100/usr/test/PROG1 The next example prints all the programs in the stack: 0010 I=1-PRM('B0') PRINT STK(I,ERR=*NEXT); I=I+1; GOTO 20 |
|||||||||||||||||
| *Note* | You can use PRM('B0') to circumvent a potential problem should the base level be level 0, rather than 1. | |||||||||||||||||
| Format 2 | The
STK( PROPERTIES ) function returns a
character string which identifies the type and number of
arguments passed into the current program. Each character
of the string represents the type of calling argument.
The possible character values are:
|
|||||||||||||||||
| Example | The
following table provides some examples of the values
return for various combinations of CALLs:
|
|||||||||||||||||