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?



On 2/28/05 3:17 AM, "Nigel Garvey" <email@hidden>
wrote:

>> 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

But why is there a coercible 'text item 2 of "9"' in the first place?

text item 2 of "9"
--> ERROR: Can't get text item 2 of "9"

Whatever is in parentheses is supposed to be executed first. So I wonder why
all the statements, including the 1 * (...),  don't error as they should?
That's the bit that's buggy.

-- 
Paul Berkowitz


 _______________________________________________
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

References: 
 >Re: What is this? (From: Nigel Garvey <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.