💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › Hypercard › HyperTalk.stuff ›… captured on 2023-05-25 at 00:20:56.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Hypertalk Control Structures


               exit <messageName> -- ends execution of handler

               exit to HyperCard


               if <condition> then <statement> [ else <statement> ]

               if <condition>

             then <statement>

             [ else <statement> ]

               if <condition> then 

             statementList

             [ else statementList]

             end if


               funtion <functionName>

             <statementList>

             end <functionName>


               on <messageName>

             <statementList>

             end <messageName>


               pass <messageName> -- ends execution and sends entire message to
             next object in heirachy.


               repeat [ for ] <number> [ times ]

             statementList

             end repeat

               repeat until <condition>

             statementList

             end repeat

               repeat while <condition>

             statementList

             end repeat

               repeat [forever]

             statementList

             end repeat

               repeat with <variable> = <start> to <finish>

             statementList

             end repeat

               repeat with <variable> = <start> downto <finish>

             statementList

             end repeat


               return <expression>

             eg:

             funtion square y

             return y * y

             end square