• 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: Nigel Garvey <email@hidden>
  • Date: Tue, 14 Sep 2004 12:07:13 +0100

Richard Morton wrote on Tue, 14 Sep 2004 17:35:47 +1000:

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

It seems to be something to do specifically with Unicode text and with
the amount and kind of automatic coercion required. There's no problem
with plain text or when the Unicode text represents an integer or a whole
real. When it represents a fractional real, the only operator that works
is '/', which is also the only operator that knows in advance that both
its operands have to be reals. There's no problem either if the number is
presented before the Unicode text:

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

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

  • Follow-Ups:
    • Re: unicode text coercion to number bug?
      • From: Mark Butcher <email@hidden>
  • Prev by Date: Re:Meeting a matrix of conditions
  • Next by Date: Re: Digest, Vol 1, Issue 1
  • Previous by thread: Re: unicode text coercion to number bug?
  • Next by thread: Re: unicode text coercion to number bug?
  • Index(es):
    • Date
    • Thread