TESTLABEL


9.5B

 

The TESTLABEL instruction validates an execution LABEL pointer. The instruction the following format:

 

(1)

[label]

TESTLABEL

{exeptr}

(2)

[label]

TESTLABEL

{funcname}

 

Where:

label

Optional. A Program Execution Label.

exeptr
Required. A previously declared execution LABEL pointer.
funcname
 Required. A previously declared Character String Variable or string Literal containing the name of a subroutine or FUNCTION to be tested.

Flags Affected: OVER

Note the following:

  1. Using the format (1), the OVER flag is set if the {exeptr} LABEL is empty or if the {exeptr} LABEL code address is not valid for any of the currently loaded program including all load module.

  2. If the format (2) is being used, the TESTLABEL instruction automatically loads and resolves all external routines in the load module if the load module is not previously loaded. In this case, the OVER is set and the error is stored in the S$ERROR$ variable if the load module causes an error when it being loaded.

  3. Using the format (2), the OVER flag is set if the name of the subroutine or FUNCTION cannot be found for the specified load module. In this case, the OVER is set and an error is stored in the S$ERROR$ variable.

 

See Also: System Interface Instructions

 



PL/B Language Reference STORELABEL WINAPI