• 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: unicode text coercion to number bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode text coercion to number bug?


  • Subject: Re: unicode text coercion to number bug?
  • From: Richard Morton <email@hidden>
  • Date: Tue, 14 Sep 2004 17:35:47 +1000

On 14 Sep 2004, at 5:17 PM, Emmanuel wrote:

At 11:42 PM -0700 13/09/04, Mark Butcher wrote:
If I do:

(1.2 as Unicode text) * 3 --> 0.4

That's fine. But if I now do:

(1.2 as Unicode text) / 3 --> AppleScript Error. Can't make "1.2" into a number.

I get the error also with your first line (on 10.2.8), and I find it normal, don't you?

I think Mark got his examples the wrong way around:

(1.2 as Unicode text) / 3 --> 0.4

(1.2 as Unicode text) * 3 --> AppleScript Error. Can't make "1.2" into a number.

I get the same result as this under 10.3.3.

Presuming that Mark is not specifically coercing a number to Unicode text just to do arithmetic on it, which seems unlikely, it may be worth him coercing the text - 'as number' - before numeric operations.

Still, the behaviour above doesn't seem ideal - they should either both work or both fail I think.

Cheers,

Numbat Cruncher

_______________________________________________
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


  • Follow-Ups:
    • Re: unicode text coercion to number bug?
      • From: Paul Berkowitz <email@hidden>
References: 
 >unicode text coercion to number bug? (From: Mark Butcher <email@hidden>)
 >Re: unicode text coercion to number bug? (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: String to list conversion
  • Next by Date: Re: unicode text coercion to number bug?
  • Previous by thread: Re: unicode text coercion to number bug?
  • Next by thread: Re: unicode text coercion to number bug?
  • Index(es):
    • Date
    • Thread