Re: unicode text coercion to number bug?
Re: unicode text coercion to number bug?
- Subject: Re: unicode text coercion to number bug?
- From: Emmanuel <email@hidden>
- Date: Tue, 14 Sep 2004 22:21:21 +0200
At 12:10 PM -0700 14/09/04, Mark Butcher wrote:
Several people replied, and I'd like to respond to all here:
The problem originated with an AS Studio project that has unicode
text as an input. The simple lines of code I'd posted reproduced the
problem in the simplest way I could think of.
Several pointed out that you shouldn't rely on automatic coercions
unless you are 100% sure of them. I had tested this with divide, and
it worked, so I assumed it would automatically coerce with multiply
also. My point is that it should either work for _both_ multiply and
divide, or not. My own feeling in this case is that it should not
work. But how can you ever be 100% sure anyway?
As others stated already, the rule as published is that AppleScript
attempts to coerce the right member to the left member's type. I mean
no offense, but your construct does not comply to the rules of
AppleScript. Unless you were really expecting to trigger an error
with "(1.2 as Unicode text) / 3" it is hard to say that you were
victim of a bug.
This being said, if tomorrow "1/0" does not trigger an error, I shall
consider it a bug.
Emmanuel
_______________________________________________
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