Subprogram Variables

The $LABINC Variable

\textbf{{\char36}LABINC}

Label increment amount

Type: Numeric, Read/Write

The $LABINC variable holds the label number increment. This increment is added to the current label number after a label is output, in preparation for the next label to be output.

The $LABNO Variable

\textbf{{\char36}LABNO}

Current label number

Type: Numeric, Read/Write

The $LABNO variable contains the current label number to use if a label is required to be output. $LABNO is incremented by $LABINC immediately following the output of a label at the start or end of a repeat range. Care must be exercised when changing $LABNO to ensure that duplicate labels are not generated, since this condition is not diagnosed by the post-processor.

The $SUBEXT Variable

\textbf{{\char36}SUBEXT}

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

\textbf{{\char36}SUBLVL}

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 $SUBMOD Variable

\textbf{{\char36}SUBMOD}

Processing mode of the subprogram (0-5)

Type: Numeric, Read-only

The $SUBMOD variable indicates the current subprogram processing mode, as follows:

0:

if no subprogram active

1:

if scanning subprogram and storing it in memory.

2:

if the subprogram is being output to the tape.

3:

if scanning the subprogram during call for status and time.

4:

if the subprogram is being emulated.

5:

if the repeat range subprogram is being emulated.

The $SUBNAM Variable

\textbf{{\char36}SUBNAM}

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

\textbf{{\char36}SUBNO}

Current subprogram number ($NULL:NA)

Type: Numeric, Read-only

The $SUBNO variable contains the current subprogram number. It will be $NULL if a subprogram is not active.

The $SUBTYP Variable

\textbf{{\char36}SUBTYP}

Type of subprogram (0-4)

Type: Numeric, Read-only

The $SUBTYP variable indicates the type of subprogram, as follows[1]:

0:

if no subprogram active

1:

this is a repeat range subprogram (type RANGE)

2:

this is a user subprogram (type CNC)

3:

this is a predefined NC control subprogram (type SYSTEM)

4:

this is an emulated subprogram (type INCLUD)