Subprogram Variables
The $SUBEXT Variable
Subprogram tape file extension Type: String, Read/Write |
The $SUBEXT variable indicates the subprogram tape file extension to use for subsequent subprogram files. The default file extension for subprograms is tps.
The $SUBLVL Variable
Current sub-level in subprogram Type: Numeric, Read-only |
The $SUBLVL variable indicates the subprogram nest level. A value of 0 means that there is no subprogram active. A value of 1 is for the first call.
The $SUBNAM Variable
Current subprogram name Type: String, Read-only |
The $SUBNAM variable contains the current subprogram name or subprogram number in string format. It will be blank if a subprogram is not active.
The $SUBNO Variable
Current subprogram stack Type: Sequence, Read-only |
The $SUBNO sequence variable lists all of the subprograms on the current call stack. An empty sequence indicates that no subprograms are active. Each successive entry in the sequence lists subprograms that are more deeply nested.
The $SUBSTK Variable
List of sub-program file names on the stack Type: Sequence, Read-only |
The $SUBSTK sequence variable contains a list of all the sub-program file names currently on the stack. The list does not include the main program file. If some sub-programs share the same NC program file, the file name will be listed for each sub-program.