Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Keywords

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

exit

exit repeat
exit functionName
exit messageName
exit to HyperCard


The exit keyword interrupts the current flow of control.


Exit repeat sends control to the end of a repeat structure, ending execution of the loop regardless of the state of the controlling conditions.


The exit functionName and exit messageName forms stop the current message or function handler. Control returns to any pending statements from another handler, if any.


Exit to HyperCard terminates all running or pending handlers and cancels all pending messages.


Using exit to leave a function handler sets the value of the function to empty.


Demo Script

on exitDemo
   answer "Would you like to see a demo?" with "No" or "Yes"
   if it is "No" then exit exitDemo
   put "Click the mouse to exit this handler…"
   put 1 into lineNum
   put the number of lines in me into totalLines
   set the autoSelect of me to true -- to get a nice solid hilite
   repeat
     if lineNum > totalLines then put 1 into lineNum
     select line lineNum of me
     if the mouseClick then exit repeat
     add 1 to lineNum
   end repeat
   wait 20
   select line 0 of me
   set the autoSelect of me to false
 end exitDemo

Placeholders

functionName
Any text string, without quotation marks, that represents the name of the function handler you want to write:

myAverage
onlyOneWindow
As in the HyperTalk examples:
function myAverage theNumbers
function onlyOneWindow


messageName
Any text string, without quotation marks, that represents the name of the message handler you want to write:

calculateDebt
selectWholeLine
As in:
on calculateDebt
on selectWholeLine theLine, aContainer


Related Topics

« do | HyperTalk Reference | function »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Keywords

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

exit

exit repeat
exit functionName
exit messageName
exit to HyperCard


The exit keyword interrupts the current flow of control.


Exit repeat sends control to the end of a repeat structure, ending execution of the loop regardless of the state of the controlling conditions.


The exit functionName and exit messageName forms stop the current message or function handler. Control returns to any pending statements from another handler, if any.


Exit to HyperCard terminates all running or pending handlers and cancels all pending messages.


Using exit to leave a function handler sets the value of the function to empty.


Demo Script

on exitDemo
   answer "Would you like to see a demo?" with "No" or "Yes"
   if it is "No" then exit exitDemo
   put "Click the mouse to exit this handler…"
   put 1 into lineNum
   put the number of lines in me into totalLines
   set the autoSelect of me to true -- to get a nice solid hilite
   repeat
     if lineNum > totalLines then put 1 into lineNum
     select line lineNum of me
     if the mouseClick then exit repeat
     add 1 to lineNum
   end repeat
   wait 20
   select line 0 of me
   set the autoSelect of me to false
 end exitDemo

Placeholders

functionName
Any text string, without quotation marks, that represents the name of the function handler you want to write:

myAverage
onlyOneWindow
As in the HyperTalk examples:
function myAverage theNumbers
function onlyOneWindow


messageName
Any text string, without quotation marks, that represents the name of the message handler you want to write:

calculateDebt
selectWholeLine
As in:
on calculateDebt
on selectWholeLine theLine, aContainer


Related Topics

« do | HyperTalk Reference | function »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View