
Indexer-Programmer-Manual.pdf REV 1.3
GOSUB Go to subroutine Statement
Purpose GOSUB transfers control to <subname> subroutine.
Syntax GOSUB <subname>
<subname> a valid subroutine name
Remarks After return from subroutine program resumes from next statement after GOSUB
See Also GOTO, JUMP, RETURN
Example:
DO
GOSUB CALCMOVE
MOVED V1
WHILE 1
END
SUB CALCMOVE
V1=(V2+V3)/2
RETURN
HALT Halt the program execution Statement
Purpose Used to halt main program execution. Events are not halted by HALT statement.
Execution will be resumed by RESET statement or by executing JUMP to code from
EVENT handler.
Syntax HALT
Remarks This statement is convenient when writing event driven programs.
See Also RESET
Example:
{Statements…}
HALT
JUMP Jump to label from Event handler Statement
Purpose This is special purpose statement to be used only in event's handler code. If this
statement is met in Event's handler code user's program will resume its operation
from location pointed by <label> argument of Jump statement after event handler
code finishes. This statement is particularly useful when there is a need for program's
flow change based on some event(s).
59
Comentarios a estos manuales