Re: decimal separating point
Re: decimal separating point
- Subject: Re: decimal separating point
- From: Emmanuel <email@hidden>
- Date: Sat, 23 Aug 2003 09:16:07 +0200
At 6:39 PM -0400 22/08/03, Marc K. Myers wrote:
>
>From: Goetz Verdieck <email@hidden>
>
>To: AppleScript Users <email@hidden>
>
>
>
>Hi,
>
>
>
>I want to create parameters for a do script like :
>
>set ar_list to " "& co05_w
>
>do shell script "perl " & p_path & p_name & ar_list
>
>
>
>The problem is the original value for co05_w is : 103.1822047245
>
>As soon as I put the value in the string it turns to 103,1822047245
>
>
>
>The decimal separating point turns to a: ,
>
>
It has everything to do with the German language settings, where the decimal separator is designated to be a comma.
>
>
You can either change the setting for the decimal separator in the "Numbers" tab of the International preferences panel or you could use AppleScript's text item delimiters to change the commas to decimal points after you convert the value from a number to a string.
Regarding the latter proposition, be aware that as long as you stay with the comma as the decimal separator your AppleScript will be unable to perform some kinds of operations that other can. For instance, converting a list of numbers into a string and back will be more difficult:
--------------------- untested
count (run script "{get pi}")
---------------------
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.