Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is this?



deivy petrescu wrote on Sun, 27 Feb 2005 21:26:52 -0500:

>On Feb 27, 2005, at 18:53, Nigel Garvey wrote:

>>  It seems to be
>> something to do with coercions and the fact that '(text item 2 of "9")'
>> is a reference.

>> If you multiply it by 1 rather than 1 by it, the expected
>> error occurs on all three systems.
>>
>
>Actually it does not happen with division no matter "where" you divide
>
>1/(text item 2 of "9") --> error as expected
>
>
>(text item 2 of "9")/1 --> error as expected

Maybe only automatic coercions from reference to number-of-unknown-class 
(after an operator) are susceptible to the effect you've discovered. '/' 
does exclusively real operations, so it already knows that it wants the 
reference coerced to real. Other operators apparently only make up their 
minds when they know if they're doing a real or integer operation. cf:

  1 div (text item 2 of "9") --> 0
  1.0 div (text item 2 of "9") --> error

  1 * (text item 2 of "9") --> 3.31595369888126E-301
  1.0 * (text item 2 of "9") --> error

NG
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.