Home > lang > quit 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id ko ja ru zh zh_TW eo
Previous  Next  Edit  Rename  Undo  Search  Administration  
Documentation  
Warning! This page is not translated.  See english version 
QUIT
QUIT [ ExitCode ]

End the program immediately.

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

Example

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 version

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

By default, the exit code is 0.

See also

Miscellaneous Control Structures, STOP