Re: Can someone please explain (Language Guide)
Re: Can someone please explain (Language Guide)
- Subject: Re: Can someone please explain (Language Guide)
- From: "Nigel Garvey" <email@hidden>
- Date: Thu, 10 Jan 2008 12:26:08 +0000
Skeeve wrote on Thu, 10 Jan 2008 11:47:59 +0100:
>Axel Luttgens wrote:
>> Not really useful in this case, but should give the idea:
>>
>> on getItem of ThisList at Pos
>> return item Pos of ThisList
>> end getItem
>>
>> getItem of {"a", "b", "c"} at 2
>> --> "b"
>Okay... You've put an "of" there. But if I read it correctly, "of" and
>"in" should be optional. It's written as
> [ of | in ]
>and not
> ( of | in )
>like it is done with the
> ( on | to )
>which is not optional for defining a handler
That appears to be a typo. The direct parameter itself can be omitted,
but if it's used, it must be preceded by either 'of' or 'in'.
It's often tempting to use labelled parameters with handlers, but there
are so few labels available that the results are usually mangled or
misleading English. Many people stick with ordered parameters on
principle, for simplicity and unambiguity.
>What I wanted to create is a handler:
> on the_last weekdayname for a_date
>
>so that I can write
> the_last Monday for current date
A date only has one weekday, of course. ;)
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden