IB Statements/messagesub

From CometWiki

< IB Statements
Revision as of 11:11, 21 May 2009 by Badge (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

MESSAGESUB statement

Syntax: MESSAGESUB statement-label

Discussion: The MESSAGESUB statement sets a branch-to address for the current program. If this program is interrupted while running (via an INTERRUPT statement from another program), program flow will be transferred to the statement-label specified in the MESSAGESUB statement.

When a RETURN statement is executed after the MESSAGESUB path has been taken, program flow continues at the statement immediately following the statement where the INTERRUPT occurred.

Example:  MESSAGESUB 9999        ! Set MESSAGESUB label
.
.
.
9999   MESSAGESUB 9999 ! Reset MESSAGESUB label
      RETURN
Personal tools