Re: Currency Numbers
Re: Currency Numbers
- Subject: Re: Currency Numbers
- From: Yvan KOENIG <email@hidden>
- Date: Tue, 20 Jun 2006 09:38:08 +0200
Le 20 juin 2006, à 04:35, Nigel Garvey a écrit :
If I switch my machine over to French and French numbers, it's only in
strings that the decimal point is a comma. It still appears as a dot in
reals in Script Editor. Is that true for French users or have I missed
something?
NG
Hello
You are perfectly right Nigel.
This is this difference that I tried to point in my late mesage:
De: email@hidden
Objet: Rép : Currency Numbers
Date: 19 juin 2006 19:49:18 GMT+02:00
À: email@hidden
Le 19 juin 2006, à 18:34, Adam Bell a écrit :
…
The passed handlers are perfect with systems using the period as
decimal separator.
In France we use the comma as decimal separator so,
set the rounding_value to "005"
set the rounding_value to ("." & the rounding_value) as number
fails with this kind of message:
"can't set .005 as number"
we must code:
set the rounding_value to "005"
set the rounding_value to ("," & the rounding_value) as number
and the result is : 0.005 (yes, with a period !!!)
Yvan KOENIG
So it is really difficult to code this kind of number crunching.
The first thing I do when I need to do that is to grab the decimal
separator with this code
set separator to character -2 of ((1 / 2) as text)
or
set separator to character -2 of (0.5 as text)
Then, when I need to work with strings, I use the variable separator.
It's a bit cumbersome.
I assume that this is why several Smile's features are available only
when the system is using the period as decimal separator.
Yvan KOENIG
_______________________________________________
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