• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: decimal separating point
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Can't save a script without .scpt extension ?
  • Next by Date: Re: Recording
  • Previous by thread: Re: decimal separating point
  • Next by thread: Re: decimal separating point
  • Index(es):
    • Date
    • Thread