Re: String to sum
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