Conditional structures

From Rosetta Code
Revision as of 16:00, 25 January 2007 by MikeMol (talk | contribs) (Added AppleScript to the RIGHT page, this time.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AppleScript

if-then-else

if myVar is "ok" then return true
set i to 0
if i is 0 then
	return "zero"
else if i mod 2 is 0 then
	return "even"
else
	return "odd"
end if