Continue this in separate thread. It seems it depends on environment how AppleScript coerce real to text. On my machine the real 1.2345E+6 is coerced to 1.2345x10^+6 whereas on other machines it is simply coerced to 1.2345E+6
you can test using this line of code
Fredrik71,
I think you are missing the point. I don’t doubt that you have a consistent coercing on in your environment. I would assume c and d both are coerced to the same string. However between different environments the string is either “1.2345E+6” or “1.2345×10^+6” (observe this string is not equal to “1.2345*(10^6)”
e.g
set realText to (1.2345E+6 as text)
display alert (1.2345E+6 as text) & return & realText
set the clipboard to realText
--1.2345E+6
--> Mac OS: 12.7.1 (21G920)
--> Script Debugger 8.0.6 (8A69)
I get the above result regardless of whether I have use scripting additions in the script.
Dunno if it’s meaningful but I have the satimage osax installed, which seemed to affect the scripts from earlier in the other thread, specifically around the exp command.
version of AppleScript --> 2.8
do shell script "sw_vers -productVersion" --> 13.6
display alert (1.2345E+6 as text) --> 1.2345E+6 is displayed.
set x to "1.2345×10^+6" as real --> error: Can’t make "1.2345×10^+6" into type real.
set y to "1.2345*(10^6)" as real --> error: Can’t make "1.2345*(10^6)" into type real.