Re: What is this?
Re: What is this?
- Subject: Re: What is this?
- From: Nigel Garvey <email@hidden>
- Date: Mon, 28 Feb 2005 21:29:10 +0000
Paul Berkowitz wrote on Mon, 28 Feb 2005 07:37:35 -0800:
>On 2/28/05 3:17 AM, "Nigel Garvey" <email@hidden>
>wrote:
>> 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?
I don't know. I'm just enjoying teasing out the circumstances. :-)
So far, it seems that the bug affects statements in the form:
[integer][dual-class math operator][reference consisting of ¬
[singular, plural, or numbered class, property, or constant] of
[numeric string]]
1 div (107th paragraph of "9")
19 + (middle Wednesday of "7.5")
43 - (boolean of "33")
12 * ("74"'s text item delimiters)
>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.
I think that whatever's in parentheses is actually marked out as being a
self-contained unit within the line. If it contains an operator, it'll be
executed before being fed into the rest of the line. But references don't
contain operators. They're resolved by external operators or by implied
'get'. The math operators are doing something very strange with them here.
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden