HPlogo MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 6 Command Definitions P-R

RETURN

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Causes execution to return from the current user command (UDC or command file) to the calling environment. (Native Mode)

Syntax

RETURN

Parameters

None

Operation Notes

This command terminates the execution of the currently executing user command. Control resumes in the calling environment at the command line following the user command in which RETURN was embedded. Invoking RETURN at the CI colon (:) prompt has no effect.

Use

This command may be issued from a session, job, program, or in BREAK. Pressing Break has no effect on this command.

Example

The following example uses the RETURN command to exit from a command file prematurely based on a parameter error condition.

  PARM ERROR_NUM
COMMENT DISPLAY CIERR MESSAGE ASSOCIATED WITH "ERROR_NUM".
IF NOT NUMERIC (!ERROR_NUM) THEN
ECHO EXPECTED A NUMBER.
RETURN
ENDIF
SETVAR CIERROR ABS (!ERROR_NUM)
ECHO !HPCIERRMSG

The last two lines above can be combined as:

  ECHO ![SETVAR(CIERROR,ABS(!ERROR_NUM))] ![HPCIERRMSG]

This line causes a slightly different output because the error number precedes the message.

Related Information

Commands

ESCAPE

Manuals

None

Feedback to webmaster