Booleans in positional parameter sub routines
Booleans in positional parameter sub routines
- Subject: Booleans in positional parameter sub routines
- From: Sun Real <email@hidden>
- Date: Mon, 18 Dec 2000 10:01:24 +1100
Trying to use the above, I came across this:
to doSomething with noise -- works
if noise then beep
end doSomething
to doSomething with noise -- execution error: "The variable noise is
not defined."
set a to 1
if noise then beep
end doSomething
to doSomething with noise -- works
noise
set a to 1
if noise then beep
end doSomething
It also works if I log 'noise', or declare it as a local.
Is this how it's suppsed to work? What's the preferred method for
dealing with it, so that it might be clear to someone else down the
track? Declare it as a local?
Cheers.
Richard
-- Great Lies of the Music Business: "Your name is at the door"