Decimal Separator

Ken Ray kray at sonsothunder.com
Sun Dec 14 16:04:15 EST 2003


Thierry,

You can find the seprators here on WinXP (should be the same on Win2K):

put queryRegistry("HKEY_CURRENT_USER\Control
Panel\International\sMonThousandSep")
put queryRegistry("HKEY_CURRENT_USER\Control
Panel\International\sMonDecimalSep")

Enjoy,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of 
> Thierry Arbellot
> Sent: Sunday, December 14, 2003 11:29 AM
> To: How to use Revolution
> Subject: Re: Decimal Separator
> 
> 
> Hi Klaus & Rob,
> 
> Thanks for your help.
> 
> At least, I found a solution for MacOS X :
> 
> the following commands
> 
> 	put replaceText(shell("defaults read NSGlobalDomain 
> NSDecimalSeparator"),"(\s|\(|\))","")
> 	put replaceText(shell("defaults read NSGlobalDomain 
> NSThousandsSeparator"),"(\s|\(|\))","")
> 
> respectively give the decimal and thousand separator setup by 
> the user 
> in the control panel
> 
> Also
> 	put replaceText(shell("defaults read NSGlobalDomain 
> NSCurrencySymbol"),"(\s|\(|\))","")
> give the currency symbol
> 
> Actually, input the command "defaults read NSGlobalDomain" in the 
> Terminal list many of the user's preferences.
> 
> I will try to find a solution on W2K later.
> 
> Regards.
> Thierry.
> 
> On Sunday, Dec 14, 2003, at 15:02 Europe/Paris, Rob Cozens wrote:
> 
> >> I'm working on the problem to know the decimal separator defined in
> >> the system, on MacOS X and W2K.
> >
> > Hi Thierry,
> >
> > While one can use "system date" syntax to find the date 
> separator and
> > order of the month, day, & year elements, I have found no way to 
> > determine the Control Panel settings for decimal & thousands 
> > separators and the currency symbol via Transcript.
> >
> > Lacking "system numberFormat" syntax, I created my own 
> solution:  All
> > number formatting handlers in Serendipity Library look for a 
> > numberEditMask property in the calling stack.  If the property is 
> > empty, the Library displays a modal "Number Edit Mask" 
> dialog stack to 
> > set it.  From the dialog the user can enter a one-char thousands 
> > separator, a one-char decimal separator, a one to three 
> char currency 
> > symbol, and instructions as to whether the currency symbol 
> is prefixed 
> > or appended.
> >
> > I don't particularly like the fact that the user must be 
> prompted for
> > number formatting preferences even when they are already 
> known to the 
> > OS; but lacking a means of discovery via Transcript 
> otherwise, what's 
> > a mother to do?
> >
> > Adding system date/time functions was a step in the right direction
> > for localization (except system time doesn't return any 
> time separator 
> > other than ":", regardless of the system settings); however the job 
> > won't be completely finished until Transcript can also inform the 
> > developer what number format is in use on the currently-running 
> > system.  Until that happens, I humbly offer Serendipity Library's 
> > number formatting support:
> >
> > <http://www.oenolog.net/ftp/serendipity_downloader.htm>
> >
> >
> > --
> >
> > Rob Cozens
> > CCW, Serendipity Software Company http://www.oenolog.net/who.htm
> >
> > "And I, which was two fooles, do so grow three;
> > Who are a little wise, the best fooles bee."
> >
> > from "The Triple Foole" by John Donne (1572-1631) 
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com 
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> >
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the use-livecode mailing list