Re: decimal separating point
Re: decimal separating point
- Subject: Re: decimal separating point
- From: julifos <email@hidden>
- Date: Fri, 22 Aug 2003 23:20:32 +0200
>
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: ,
>
>
Has this something to do with the german language settings ?
>
How can I avoid this.
>
>
Please help
>
>
Gvtz Verdieck
Hi!
AppleScript's decimal separator is a dot "."
When you coerce it to string, it does depending on user's local settings, as
defined in the international pref-pane... It can be a dot, a comma, a blank
space or whatever the user likes for his system...
A quick way to determine user's separator is the following:
###########################
set userDecSeparator to (1.0 as string)'s item 2
###########################
So, you can stat:
if userDecSeparator is not a dot, then do whatever to prepare my perl script
jj
_______________________________________________
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.