| **Navigation:**  [[introduction.htm|Language Reference]] > 12 - Execution Control > Execution Control Statements >====== EXIT (leave a ROUTINE) ====== | [[do call a routine .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[goto go to a label .htm|{{btn_next_n.gif|Next page}}]] | | || ** ** **EXIT** {{blk2blue.jpg|blk2blue.jpg}} The **EXIT** statement immediately leaves a ROUTINE and returns program control to the statement following the DO statement that called it. This is different from RETURN, which completely exits the PROCEDURE even when called from within a ROUTINE. An EXIT statement is not required. A ROUTINE with no EXIT statement terminates automatically when the entire sequence of statements in the ROUTINE is complete. **Example:** **CalcNetPay ROUTINE** ** IF GrossPay = 0   !If no pay** ** ****EXIT****             ! exit the routine** ** END** ** NetPay = GrossPay - FedTax - Fica** ** QtdNetPay += NetPay** ** YtdNetPay += NetPay** **See Also:** [[do call a routine .htm|DO]] [[return return to caller .htm|RETURN]]