Re: Dates gone wild
Re: Dates gone wild
- Subject: Re: Dates gone wild
- From: Walter Ian Kaye <email@hidden>
- Date: Wed, 10 Sep 2003 01:11:44 -0700
At 12:15a +0200 09/10/2003, Axel Luttgens didst inscribe upon an
electronic papyrus:
-- An index reference form is not a reference
item 1 of {1, 2} = contents of (item 1 of {1, 2})
--> true
I like the 'as item' dereferencing alternative to 'contents of', in loops:
set curMonth to month of (current date)
set monthList to {January, February, March, April, May, June, ,
July, August, September, October, November, December}
repeat with m from 1 to 12
if curMonth is (item m of monthList) as item then exit repeat
end repeat
"Month number: " & m
And before anyone asks where that one's written, I'll just say that
it fell out of my head several years ago. :-)
(Well I guess I shouldn't call it dereferencing if an index form
isn't a reference, but what else to call it?)
-boo
_______________________________________________
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.