Decimal Separator

Thomas J McGrath III 3mcgrath at adelphia.net
Mon Dec 15 08:21:10 CST 2003


Hello all,

You know this is exactly the kind of info that I know I will need in 
exactly seven and a half months from now and not remember what it was 
or exactly where it was. I wish there was a place in REV to update 
important info like this. I know I could copy it somewhere myself and I 
do but stickies just gets confusing and I loose my word files.

Tom

On Dec 15, 2003, at 6:25 AM, Thierry Arbellot wrote:

> Successfully tested on Win2K
>
> Many thanks.
>
> Thierry.
>
> On Sunday, Dec 14, 2003, at 22:04 Europe/Paris, Ken Ray wrote:
>
>> 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
>>>
>>
>>
>> _______________________________________________
>> 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
>
>

Macintosh PowerBook G-4 OSX 10.3.1, OS 9.2.2, 1.25 GHz, 512MB RAM, Rev 
2.1.2


Advanced Media Group
Thomas J McGrath III	• 2003 •	3mcgrath at adelphia.net
220 Drake Road, Bethel Park, PA 15102





More information about the use-livecode mailing list