| **Navigation:**  [[introduction.htm|Language Reference]] > 12 - Execution Control > Execution Control Statements >====== GOTO (go to a label) ====== | [[exit leave a routine .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[return return to caller .htm|{{btn_next_n.gif|Next page}}]] | | || ** ** **GOTO** //target// {{blk2blue.jpg|blk2blue.jpg}} | **GOTO** | Unconditionally transfers program control to another statement. | | //target// | The label of another executable statement within the PROGRAM, PROCEDURE, or ROUTINE. | The **GOTO** statement unconditionally transfers control from one statement to another. The //target// of a GOTO must not be the label of a ROUTINE or PROCEDURE. The scope of GOTO is limited to the currently executing ROUTINE or PROCEDURE--it may not //target// a label outside the ROUTINE or PROCEDURE in which it is used. Extensive use of GOTO is generally not considered good structured programming practice. LOOP is usually considered a better alternative. **Example:** **ComputeIt PROCEDURE(Level)** ** CODE** ** IF Level = 0** ** ****GOTO**** PassCompute                     !Skip rate calculation if no Level** ** END   ** ** Rate = Level * MarkUp                 !Compute Rate** ** RETURN(Rate)                          !and return it** **PassCompute RETURN(999999)             !Return bogus number** **See Also:** [[loop iteration structure .htm|LOOP]]