Labels

A label marks a certain line in a command procedure. These labels can be used as targets for GOTO, GOSUB, and CALL commands or certain other commands capable of branching, such as READ/END or OPEN/ERROR.

It is possible for a single command line to include both a label and a command, but for the sake of clarity, you may wish to place a label alone on a line.

A label starts at the beginning of a line, may not contain blanks, and ends with a colon (:). You should give a label a name that provides some information about why it is being used. This helps with the clarity of the code.

The author usually follows the convention of typing labels in upper case and most other commands in lower case. This is a completely personal matter, and you may choose any method that works for you.

Labels are used in branching, which is discussed next.



Getting Started with OpenVMS(c) A Guide for New Users
Getting Started with OpenVMS: A Guide for New Users (HP Technologies)
ISBN: 1555582796
EAN: 2147483647
Year: 2005
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net