Re: Non Compulsory Parameters & a Null Constant ?
Re: Non Compulsory Parameters & a Null Constant ?
- Subject: Re: Non Compulsory Parameters & a Null Constant ?
- From: Adam Hinshaw <email@hidden>
- Date: Wed, 12 Feb 2003 18:52:16 +1100
whoops my reply went straight to Michelle, forgot about this lists
peculiarities!
see what you missed below + latest reply :)
on 12/2/03 5:28 PM, Michelle Steiner at email@hidden wrote:
>
>
On Tuesday, February 11, 2003, at 11:03 PM, Adam Hinshaw wrote:
>
> ahhh, missing value. That is what i was after in terms of a null constant.
>
>
>
>but with the parameters i was hoping to avoid having to type a parameter when
i didn't need to. ie lazy me + ugly code.
>
> surely the applescript runtime could/should populate any 'missing'
>
> parameters with missing value ? I definitely don't want to go down the
>
> try/error catch path for all handler calls either.
>
>
How? If the handler is
>
>
on foo (var1, var2, var3)
>
>
And you call it with
>
>
foo (varA, varB)
>
>
How does it know which parameter to populate with missing value?
linear from the end i guess, as parameters are position dependent anyway.
So var3 in the handler would be 'missing value'
>
> When would missing value be used in other scripts ?
>
>
Whenever you need to declare a variable without assigning it a
>
value--defining a property is one instance.
>
missing value is not the same as null though.
>
>
display dialog missing value
>
>
The dialog will display "msng" (without the quotes)
oh i get it like local & global declarations as well.
There must be some other use for it ?
adam
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.