next up previous contents
Next: IF statements Up: GOTO Statements Previous: Computed GOTO

   
Assign GOTO

The last form of GOTO is the ASSIGNED GOTO. It has the form :-

GOTO variable
Variable must contain a valid label set before the GOTO is executed using the ASSIGN statement whose form is
ASSIGN statement label TO variable
For example:-
          ASSIGN 123 TO JUMP

          .
          .
          .

          GOTO JUMP
 
is equivalent to:-
 
          .
          .
          .

          GOTO 123
Never try to do this (unless it is just to see what happens):-
JUMP=123
GOTO JUMP
for JUMP has to contain the address in memory holding the statement labelled 123, not the value 123 itself. You are strongly advised NOT to use the assigned GOTO. It is always unnecessary and can make programs obscure and difficult to debug. The feature is now deemed to be obsolete (for very good reasons!)



n west (APC)
2000-03-08