Contents - Index


 

Use ProcLabel within a procedure to specify a branch destination for a ProcGoto or ProcGoSub statement.

 

For performance reasons, ProcLabel must be entered as Label.

 

Required Operands

 

NAME label name.  NAME can be up to 8 characters in length, composed of the letters A-Z, the numerals 0-9, and the special characters dash (-), dollar sign ($), and the underscore (_).

 

For performance reasons, some special rules apply to the ProcLabel command. The ProcLabel command itself must begin in column 1 (column 2 if the trap character is needed).  Exactly one space should follow the ProcLabel command. The label name should then immediately follow.  These rules allow the ProcGoto and ProcGoSub commands to compare specific columns within a line when scanning for the correct label.

 

Return Codes

 

OK Successful.

 

Examples

 

The following example shows how the ProcLabel command could be used within a procedure that processes a sequence of statements 12 times:

 

 ------------------------------------------------------------------------

 DECLARE COUNTER,NUM,6,V

 SET COUNTER,0

 LABEL D20

 ADD COUNTER,1

 IF COUNTER,GT,12

     GOTO E20

   .... lines to be processed 12 times ....

 GOTO -D20

 LABEL E20

 ------------------------------------------------------------------------