B.8. SubroutinesIn HyperTalk, you define a subroutine like this: on triple someNumber
return someNumber * 3
end tripleAnd run it like this: triple 10 --Would return 30 In AppleScript, however, you define a subroutine like this (Section 5.2.5): on triple(someNumber)
return someNumber * 3
end tripleAnd run it like this: triple(10) As you can see, the difference with HyperTalk is that you don't type parentheses around the value you want to perform a subroutine on. |