• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dates gone wild
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Dates gone wild (From: Nigel Garvey <email@hidden>)
 >Re: Dates gone wild (From: Doug McNutt <email@hidden>)
 >Re: Dates gone wild (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: printable docu about extensions, etc
  • Next by Date: Re: delay procedure for waiting less than a second
  • Previous by thread: Re: Dates gone wild
  • Next by thread: Re: Dates gone wild
  • Index(es):
    • Date
    • Thread