| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== SETEXITCODE (set program exit code) ====== | [[setdropid set dropid return string .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setfont specify font .htm|{{btn_next_n.gif|Next page}}]] | | || {{newc7.jpg|NewC7.jpg}} **SETEXITCODE( **//exit code// **)** {{blk2blue.jpg|blk2blue.jpg}} | **SETEXITCODE** | Sets the program's exit code. | | //exit code// | A positive integer constant or variable which is the exit code to pass to DOS, setting the DOS ERRORLEVEL. If omitted, the default is zero. | **SETEXITCODE** is used to set a program's exit code (error level). This is useful in displaying some meaningful message or action without the necessity of closing the program immediately. **See Also:** [[getexitcode query program exit code .htm|GETEXITCODE]]