QUIT
QUIT [ ExitCode ]
End the program immediately.
All windows are closed, then deleted, and everything is freed as cleanly as possible.
Since 3.18
QUIT
ends the process brutally, without letting the C library and the shared libraries call their clean-up routines.
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