McIDAS User's Guide
Version 2011.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]


GOSUB

Changes the normal downward flow of control.


Syntax

GOSUB x


Parameter

x

any valid numeric expression


Remark

This command is like GOTO, except control may be returned to the statement following the GOSUB by executing a RETURN statement.


Example

GOSUB 1000  
  100 REM Return Here
  .  
  .  
  1000 PRINT B
  1010 RETURN

In this example, control is returned to line 100.


[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]