quit

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
quit [<exitCode>]
Summary

Quits the application.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
exitCode

The exit status to return to the operating system. If you don't specify an exitCode, the exit status is 0. The exitCode must be an integer greater than or equal to 0.

Example
quit 1
if it is "OK" then
  quit
end if
RelatedMessage: shutdownRequest, shutdown
Command: kill, close process
Glossary: application, command, standalone application, control structure, message
Control Structure: if
Description

Use the quit command to exit LiveCode (or a standalone application).

Once issued, the quit command triggers a shutdownRequest message. If the shutdownRequest message is not passed then the quit will be blocked (i.e. the program won't close).

If you want to check a condition or ask the user for confirmation before deciding whether to quit, use an if control structure:

on getMeOuttaHere
    answer "Are you sure you want to quit?" with "No way" or "OK"
    if it is "OK" then 
        quit
    end if
end getMeOuttaHere

To force a quit without sending a shutdownRequest message use:

lock messages 
quit

Tagswindowing