Proc Reference > PQN Proc Commands > RSUB

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

RSUB command (Proc) (m618403+rsub.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

RSUB

Terminates execution of a local subroutine and returns control to the statement following the GOSUB command that called the subroutine.

Syntax

RSUB {n}

Syntax Elements

n specifies return control to the nth statement after the GOSUB.

If n is not specified, the default value is 1.

Operation

The RSUB command terminates execution of a local subroutine and returns control to the statement following the GOSUB that originally called the subroutine.

If an RSUB is executed without having been called by a previous GOSUB, it is ignored and execution continues with the next statement.

Examples

GOSUB 400
OENTER ACCOUNT NUMBER+
.
.
.
400 O***ILLEGAL ENTRY***
RI
IP?
RSUB

In this example, RSUB returns control to the statement following the GOSUB, that is, OENTER ACCOUNT NUMBER+.

GOSUB 22
OFIRST
OSECOND
OTHIRD
.
.
.
22 C*LOCAL SUBROUTINE ENTERED
RI
RSUB 2

This example returns control to the 2nd statement following the GOSUB, that is, to OSECOND.

RealityV15.0Comment on this topic