<doc>
  <legacy_id>1624</legacy_id>
  <name>quit</name>
  <type>command</type>
  <syntax>
    <example>quit</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Windows &amp; Dialog Boxes</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="kill">kill Command</command>
    <command tag="close process">close process Command</command>
    <message tag="shutdownRequest">shutdownRequest Message</message>
    <message tag="shutdown">shutdown Message</message>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Quits the <glossary tag="application">application</glossary>.</summary>
  <examples>
    <example>quit</example>
    <example>if it is "OK" then</p><p>  quit</p><p>end if</example>
  </examples>
  <description>
    <p>Use the <b>quit</b> <glossary tag="command">command</glossary> to exit LiveCode (or a <glossary tag="standalone application">standalone application</glossary>).</p><p/><p><b>Comments:</b></p><p>Once issued, the <b>quit</b> <glossary tag="command">command</glossary> triggers a <message tag="shutdownRequest">shutdownRequest message</message>.  If the <message tag="shutdownRequest">shutdownRequest message</message> is not passed then the <b>quit </b>will be blocked (i.e. the program won't close).</p><p/><p>If you want to check a condition or ask the user for confirmation before deciding whether to quit, use an <control_st tag="if">if</control_st> <glossary tag="control structure">control structure</glossary>:</p><p/><p>  on getMeOuttaHere</p><p>    answer "Are you sure you want to quit?" with "No way" or "OK"</p><p>    if it is "OK" then </p><p>      quit</p><p>    end if</p><p>  end getMeOuttaHere</p><p/><p>To force a quit without sending a <message tag="shutdownRequest">shutdownRequest message</message> use: </p><p>  lock messages </p><p>  quit </p><p/>
  </description>
</doc>