FutureBasic Logo

<<    Index    >> FutureBasic

stop   statement

stop [ PascalString ]

This statement interrupts program execution and displays a dialog box that shows the line number where the stop statement appeared, and gives the user the option of continuing, stopping or crashing the program. If the optional string parameter is used, it will be displayed as a message in the alert. If no string parameter is used, FutureBasic displays the name of the file in which the stop statement was used.
STOP Statement Image
If the user clicks the "Stop" or "Crash" button, FutureBasic issues a macOS abort()1., and your program ends.
If the user clicks the "Continue" button, execution continues at the next statement following the stop statement.

stop is mainly useful as a debugging tool and is not recommended for use in the "production" version of your program.

1. Unlike the macOS exit() function (see end in FB Help), abort() may not close files that are open. It may also not delete temporary files and may not flush stream buffer.

See also