Language keyword STOP

20  STOP [error]
Terminates execution of a program, closes all files opened by the program, and returns control to the operating system.

See examples

If there is insufficient information on this page and you wish learn more about STOP, please send an email to You can help to improve information about STOP by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.

  • error – A numeric expression.

The error is the value which will returned to operating system; if not specified SmallBasic returns 0.

On DOS/Windows, The ‘error’ value is known as ERRORLEVEL