Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Parameters

Examples

HELP RETURN — VMS 5.0

  Terminates a GOSUB subroutine procedure.   Returns  control  to  the
  command following the calling GOSUB command.

  Format:


    RETURN  [status-code]

Additional information available:

ParametersExamples

Parameters

 status-code

  Defines a numeric value for the reserved global symbol $STATUS.  You
  can   specify  the  status-code  as  an  integer  or  an  expression
  equivalent to an integer value.  The value can be tested by the next
  outer  command  level.  low-order three bits of the longword integer
  value change the value of the reserved global symbol $SEVERITY.

  If you specify a status-code, DCL  will  interpret  the  code  as  a
  condition  code.   Note  that  even  numeric values produce warning,
  error, and fatal error messages, and that odd numeric values produce
  either no message or a success or informational message.

  If you do not specify a status-code, the current value of $STATUS is
  saved.   When  control  returns  to the outer command level, $STATUS
  contains the  status  of  the  most  recently  executed  command  or
  program.

Examples

  1.
       $ SHOW TIME
         26-SEP-1985 14:25:42
       $ GOSUB SYMBOL
       $ EXIT
       $ SYMBOL:
       $     SHOW SYMBOL RED
             RED = "SET DEFAULT [MALIN.DCL]"
       $     RETURN 1

  The GOSUB  command  transfers  control  to  the  subroutine  labeled
  SYMBOL.   After  the  subroutine  is  executed,  the  RETURN command
  transfers control back to the command following  the  calling  GOSUB
  statement, giving $STATUS and $SEVERITY a value of 1.  The procedure
  then exits.

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