{"identifier":25835,"topic":"Keywords","name":"exit","text":"<code><pre>exit repeat\nexit <i>functionName<\/i>\nexit <i>messageName<\/i>\nexit to HyperCard\n<\/pre><\/code> The<code> exit <\/code>keyword interrupts the current flow of control. <br><br>\n\n <code>Exit repeat <\/code>sends control to the end of a<code> repeat <\/code>structure, ending execution of the loop regardless of the state of the controlling conditions. <br>\n<br>\nThe<code> exit <i>functionName<\/i> <\/code>and<code> exit <i>messageName<\/i> <\/code>forms stop the current message or function handler. Control  returns to any pending statements from another handler, if any. <br><br>\n\n <code>Exit to HyperCard <\/code>terminates all running or pending handlers and cancels all pending messages.  <br><br>\n\n Using<code> exit <\/code>to leave a function handler sets the value of the function to empty. <br>\n","related":{"25888":"function","26982":"on","27427":"repeat","27895":"repeat for","28073":"repeat until","28298":"repeat while","28477":"repeat with"},"examples":"","demo":"on exitDemo\n   answer \"Would you like to see a demo?\" with \"No\" or \"Yes\"\n   if it is \"No\" then exit exitDemo\n   put \"Click the mouse to exit this handler\u2026\"\n   put 1 into lineNum\n   put the number of lines in me into totalLines\n   set the autoSelect of me to true -- to get a nice solid hilite\n   repeat\n     if lineNum > totalLines then put 1 into lineNum\n     select line lineNum of me\n     if the mouseClick then <b>exit<\/b> <b>repeat<\/b>\n     add 1 to lineNum\n   end repeat\n   wait 20\n   select line 0 of me\n   set the autoSelect of me to false\n end exitDemo\n ","debug":{"9":["exit repeat\rexit fun"],"10":["The exit functionNam"]}}