Labels

A label is any word that is followed by a colon (with no space between the word and the colon) and is not in quotation marks. For example:

MYNAME:

A label marks the start of a subroutine. The following example shows one use of a label (called error) within a procedure:

  .
  .
  .
IF problem  = 'yes' then SIGNAL error
  .
  .
  .
error:
   SAY 'Problem in your data'
   EXIT


[Back: Assignments]
[Next: Working with Variables and Arithmetic]