Re:getting real numbers from string expressions
Re:getting real numbers from string expressions
- Subject: Re:getting real numbers from string expressions
- From: Olof Hellman <email@hidden>
- Date: Fri, 25 May 2001 12:27:55 -0700
>
I'm working on a script that extracts data from FileMaker and operates on a
>
Quark file. The data is in string format, but indicates a measurement, like
>
"7 7/8" or "7-7/8" (meaning 7 + 7 / 8).
You can always do
run script "7-7/8"
--> 6.125
This brings up my all-time favorite AppleScript gotcha:
5 - -2
--> 7
5 --2
--> 5
Ah, the subtleties of whitespace!!
- Olof