<doc>
  <legacy_id>2152</legacy_id>
  <name>interrupt</name>
  <type>function</type>
  <syntax>
    <example>the interrupt</example>
    <example>interrupt()</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>User Interaction</category>
  </classification>
  <references>
    <property tag="allowInterrupts">allowInterrupts Property</property>
    <message tag="errorDialog">errorDialog Message</message>
    <property tag="lockErrorDialogs">lockErrorDialogs Property</property>
  </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><glossary tag="return">Returns</glossary> true if the <property tag="allowInterrupts">allowInterrupts</property> <glossary tag="property">property</glossary> is false and the user has attempted to halt the current <glossary tag="handler">handler</glossary> with a <glossary tag="key combination">key combination</glossary>.</summary>
  <examples>
    <example>if the interrupt then doCleanExit</example>
  </examples>
  <description>
    <p>Use the <b>interrupt</b> <control_st tag="function">function</control_st> within a <glossary tag="handler">handler</glossary> to check whether the user has attempted to stop the <glossary tag="handler">handler</glossary> by typing Control-period or Control-break (on <function tag="openStacks">Windows</function> or <glossary tag="Unix">Unix</glossary>) or Command-period (on <glossary tag="Mac OS">Mac OS</glossary>).</p><p/><p><b>Value:</b></p><p>The <b>interrupt</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> true or false.</p><p/><p><b>Comments:</b></p><p>Normally, pressing one of the key combinations stops any running handlers. If the <b>allowInterrupts</b> <glossary tag="property">property</glossary> is set to false, the user cannot interrupt a <glossary tag="handler">handler</glossary> in this way.</p><p/><p>To let the user interrupt a handler when the <b>allowInterrupts</b> is false, check the <b>interrupt</b> <control_st tag="function">function</control_st> periodically. If it <glossary tag="return">returns</glossary> true, the user has attempted to stop the handler. You can then perform any needed cleanup tasks before <glossary tag="exit">exiting</glossary> the <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>