• 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: Change the mod result in list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change the mod result in list


  • Subject: Re: Change the mod result in list
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 22 Aug 2002 12:06:20 -0700

On Thursday, August 22, 2002, at 11:59 AM, bill wrote:

OK, I get it, ((i mod N = 0) as integer) means (true as integer).

Only if i mod N is zero; otherwise it means (false as integer)

After some checking,

{true as integer, false as integer, 1 as boolean, 0 as boolean}
-- {1, 0, true, false}

So, it's confusing now, cause in Applescript in a Nutshell, page 53, it's quoted that "You cannot use numerical values (such as 0, 1, -1) as boolean values.

That's true; you can't use them as boolean values, but you can coerce them to boolean values.

You can coerce them because they are enumerated types. In other languages, enumerated types can be implicitly coerced, but not in AppleScript. You have to be careful, though, when coercing booleans to integers because in some languages, true is 1, and in others true is -1.

Interesting that there are various ways to do the same things.

Fer shure. :)

--Michelle

We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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: Change the mod result in list (From: bill <email@hidden>)

  • Prev by Date: Re: [Apple List Admin] Re: Clarification (was: Re: AppleScript and international characters)
  • Next by Date: Re: applescript-users digest, Vol 3 #770 - 16 msgs
  • Previous by thread: Re: Change the mod result in list
  • Next by thread: Re: Change the mod result in list
  • Index(es):
    • Date
    • Thread