lang • quit

QUIT

QUIT [ ExitCode ]

End the program immediately.

All windows are closed, then deleted, and everything is freed as cleanly as possible.

Examples

Public Function Calcmean(fSum As Float, fCount As Float) As Float

  If fCount = 0 Then
    Print "Division by 0 in function Calcmean"
    Quit
  Endif

  Return fSum / fCount

End

This instruction is not very successful in freeing things with GUI programs. So you should use it only with console applications.

Exit code

Since 3.4

You can optionally specify the exit code returned by the program to the parent process.

By default, the exit code is 0.

See also