Re: Booleans in positional parameter sub routines
Re: Booleans in positional parameter sub routines
- Subject: Re: Booleans in positional parameter sub routines
- From: Nigel Garvey <email@hidden>
- Date: Mon, 18 Dec 2000 01:32:24 +0000
Sun Real wrote on 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
Hi, Richard. Try it like this:
to doSomething given noise:noise -- NB: 'given'
set a to 1
if noise then beep
end doSomething
doSomething with noise
NG