Label

From VSI OpenVMS Wiki
Revision as of 14:16, 18 December 2023 by Jane.doe (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.