[OS X TeX] decimal numbers in Applescript

Frank STENGEL fstengel at mac.com
Tue Nov 30 18:42:08 CET 2004


Le 30 nov. 04, à 17:21, Claus Gerhardt a écrit :

> Could someone with an American number format in the OS, please check, 
> if the result of the Applescript command
>
> set x to "0,5" as number
> x
>
> gives x=0.5
>
> On my system it does, even after  switching  to an American format, 
> though I am suspicious that I would first have to restart Applescript, 
> before the change will become effective, but which I would like to 
> avoid.
>
> Applescript refuses to make the string "0.5" into a number.

what do you mean by "switching  to an American format"? If you mean 
setting the language to English then it is normal it fails. 
Furthermore, the format has to be set *before* you start script editor.

I just tried your example after having set the preferred language to 
English and the number/date etc. formats to United States (English), 
the restult is as expected: an error...
-- 
Frank STENGEL (stengelf<at>menara.ma)
               (fstengel<at>mac.com)
               (fstengel<at>nordnet.fr)

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list