Difference between revisions of "Label"

From VSI OpenVMS Wiki
Jump to: navigation, search
(Created page with "A '''label''' is a statement in a DCL command procedure that marks a certain place in the command procedure for purposes of execution flow control. It ca...")
 
(No difference)

Latest revision as of 14:16, 18 December 2023

A label is a statement in a DCL command procedure that marks a certain place in the command procedure for purposes of execution flow control. It can be any string preceded by a dollar sign and followed by a colon (:):

$ SHOW TIME
$LOOP:
$ FILE = F$SEARCH("FILE.LIS")
...

In the example above, "LOOP" is a label. It is possible to refer to this label with GOTO or GOSUB as well as /END and /ERROR qualifiers of the READ command and some other commands.