• 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: String to sum
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String to sum


  • Subject: Re: String to sum
  • From: Mr Tea <email@hidden>
  • Date: Tue, 12 Oct 2004 17:22:46 +0100

This from Graff - dated 12/10/04 12ยท35 pm:

> On Oct 12, 2004, at 4:39 AM, Mr Tea wrote:
>
>> Is it possible to coerce mathematical symbols (+, -, *,  etc.) from a
>> string?

> Sure, but how do you want to coerce them?


I want to convert thusly:

 "+" --> +

 "*" --> *

...etc.

Operators and operands are received by the script in string format and need
to be used in calculations.

So, in fact, PB's suggestion...

  run script "4 + 5"

...is exactly suited to my needs.


However, when it's done that way there is a certain hesitancy to the script,
which is not there when I take the alternate route of looping through a list
of stringified operators until I find the one that matches the input.

Is there a significant overhead or delay associated with 'run script...'?


Nick
pp Mr Tea

--


 _______________________________________________
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: String to sum
      • From: Emmanuel <email@hidden>
    • Re: String to sum
      • From: Emmanuel <email@hidden>
    • Re: String to sum
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: String to sum (From: Graff <email@hidden>)

  • Prev by Date: RE: String to sum
  • Next by Date: Re: String to sum
  • Previous by thread: Re: String to sum
  • Next by thread: Re: String to sum
  • Index(es):
    • Date
    • Thread