GOTO |
"Goto" is used to branch to a label.
Gotolabel
|
Element |
Description |
Restrictions |
|
label |
label may be preceded by the '$' character. |
Must be defined in the routine. |
infbox "I am going there ..."Goto ETIQ_1
.... (end of routine)ETIQ_1infbox "I am there ..."
Goto is used to branch forward or back, breaking the sequence of a routine, essentially in order to make conditional loops or executions.
Bearing in mind the number of possible control structures (For..To..Next, While..Wend, Repeat..Until, Case..When..Endcase, If..Elsif..Else..Endif, Break, Gosub, Call ) and the unreadability of programmes "packed" with Goto, you are strongly advised to avoid abuse of this instruction, attractive though it is on the face of it…
No associated error (an undefined label is detected when the routine is validated and not when it is run).
|
|