Re: trouble with weekday names
Re: trouble with weekday names
- Subject: Re: trouble with weekday names
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 17 Dec 2007 21:24:31 -0500
On Dec 17, 2007 5:43 PM, David Crowe <
email@hidden> wrote:
It returns "class" as the class of weekday!
Yes. Monday, Tuesday, et al are each their own class. Lots of AppleScript's "enumerated types" seem to be defined this way - I guess it avoids the whole "redefining what Monday means" problem.
From the programmer's perspective, the important thing is that such values are essentially sealed boxes. There's a manifest taped to the outside that says there's a "monday" inside, whatever that means, and you can look at another box to see if it claims to contain the same thing, but there's no way to look inside the box and see what that really means.
Fortunately, you can convert the values to numbers for math, or to strings for display... but until you do the conversion, they are neither numbers nor strings, neither fish nor fowl - just magic.
--
Mark J. Reed <
email@hidden>
_______________________________________________
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