LOADLABEL


9.5B

 

The LOADLABEL instruction loads an execution LABEL pointer from a list of Program Execution labels, LABEL pointers, and EXTERNAL labels. This instruction uses a numeric index to find and load the execution program label into the destination. The instruction the following format:

 

 

[label]

LOADLABEL

{extptr}{sep}{index}{sep}{prog-exe-list}

 

Where:

label

Optional. A Program Execution Label.

extptr
Required. A previously declared execution LABEL pointer that is loaded with the address of a program execution label.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

inde}

Required. A previously defined Numeric Variable or Expression used in selecting a Program Execution label that is loaded.
prog-exe-list
Required. A list of Program Execution labels, previously defined execution LABEL pointers, or previously defined EXTERNAL variables.

Flags Affected: none

Note the following:

  1. If the {index} value is less than one or greater than the total number of items in the {prog-exe-list}, the LOADLABEL instruction is ignored without any changes.

  2. Additional lines may be used by ending each continued line with a colon (:).

  3. If {index} is not a decimal integer, only the integer portion of the variable is used. For example, if it has a value of 3.6, 3 is used.

  4. Null entries in the list are allowed and are signified by two commas with no label name between them. When the index value is associated with a null entry, LOADLABEL instruction is ignored without any changes. This feature allows a program to define a default LABEL pointer action that can be pre-defined before the LOADLABEL instruction is executed.

  5. If the index value is associated with an EXTERNAL label reference, the LOADLABEL instruction automatically loads and resolves all external routines in the load module if the load modules is not previously loaded. This capability allows a program to only load the load modules that are referenced in the program on a demand basis.

 

 

See Also: System Interface Instructions

 



PL/B Language Reference LOADADR LOADPARM