Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Parameters

Examples

HELP GOTO — VMS 4.6

  Transfers control to a labeled statement in a command procedure.

  Format:


    GOTO  label

Additional information available:

ParametersExamples

Parameters

 label

  Specifies a 1- through 255-alphanumeric character label appearing as
  the  first item on a command line.  A label may not contain embedded
  blanks.  When the GOTO command is executed, control  passes  to  the
  command following the specified label.

  The label can precede or follow the GOTO statement  in  the  current
  command  procedure.  When you use a label in a command procedure, it
  must be terminated with a colon.

Examples

  1.   $ IF P1 .EQS. "HELP" THEN GOTO TELL
       $ IF P1 .EQS. "" THEN GOTO TELL
          .
          .
          .

       $ EXIT
       $ TELL:
       $ TYPE SYS$INPUT
       To use this procedure, you must enter a value for P1.
          .
          .
          .

       $ EXIT

  The IF command checks the first  parameter  passed  to  the  command
  procedure;  if this parameter is the string HELP or if the parameter
  is not specified, the GOTO command is executed and control is passed
  to  the  line  labeled  TELL.   Otherwise,  the  procedure continues
  executing until the EXIT command is encountered.  At the label TELL,
  a  TYPE command displays data in the input stream that documents how
  to use the procedure.

  2.   $ ON ERROR THEN GOTO CHECK
          .
          .
          .

       $ EXIT
       $ CHECK:  ! Error handling routine
          .
          .
          .

       $ END:
       $ EXIT

  The ON  command  establishes  an  error-handling  routine.   If  any
  command  or procedure subsequently executed in the command procedure
  returns an error or severe error return, the GOTO command  transfers
  control to the label CHECK.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026