Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > L

LABEL (Short Name: LAB)

Scroll Prev Top Next More

In a GOTO or WHENEVER statement, use the LABEL command to identify the command line to which control should be passed.

 

LABEL

 

Option

 

lblname

Specifies a 1 to 18 character name that labels a line to skip to when a GOTO command is executed in a command or procedure file.

 

About the LABEL Command

 

After a command file is run once, R:BASE stores the labels in memory. When the command file is run again, R:BASE retrieves the location of a label when the GOTO or WHENEVER is run. However, if the GOTO or WHENEVER command is going to be run only once, place the LABEL command below the GOTO or WHENEVER command because it is more efficient for R:BASE to search downward in the command file for the matching label.

 

Example

 

In the following example, if the vctrvar variable in the IF...THEN statement is equal to 999, control passes to the command lines following the LABEL command, which defines the endproc label. If vctrvar does not equal 999, the command lines following the ELSE statement are performed.

 

IF vctrvar = 999 THEN

  GOTO endproc

ELSE

  *( commands to execute )

ENDIF

 

.

.

.

 

LABEL endproc

  *( commands to execute )