Copyright Digital Equipment Corp. All rights reserved.

RETURN

 The RETURN statement passes control back  to  the  caller  of  a
 PROCEDURE,   FUNCTION,  PROGRAM,  or  module  initialization  or
 finalization section.  A RETURN statement  is  equivalent  to  a
 GOTO to a label placed just before the END of the body, and in a
 PROGRAM, has the effect of stopping the program


 Syntax:

 RETURN [ return-value ]


 Inside a FUNCTION, return-value specifies an  ending  value  for
 the  FUNCTION.   If  no return-value is provided, the last value
 assigned to the function identifier  is  used  as  the  function
 result.   The  return-value  type  and function type must be the
 same.

 Inside a PROGRAM, the return-value specifies an ending value for
 the  PROGRAM.   If you do not provide a return-value, VSI Pascal
 uses the value 1 on OpenVMS systems.

 Inside a PROCEDURE, module  initialization  section,  or  module
 finalization section, VSI Pascal generates an error.


Additional information available:

Example