Search results
Results from the WOW.Com Content Network
AppleScript supports compound statement code structure via either single or multiple line syntax. The multiple line syntax ends a code block with a phrase that like end keyword where keyword is the statement keyword at the start of the block. For example:
var x1 = 0; // A global variable, because it is not in any function let x2 = 0; // Also global, this time because it is not in any block function f {var z = 'foxes', r = 'birds'; // 2 local variables m = 'fish'; // global, because it wasn't declared anywhere before function child {var r = 'monkeys'; // This variable is local and does not affect the "birds" r of the parent function. z ...