Page 1 of 1 1
Topic Options
#177754 - 2007-07-11 02:51 PM Decimal separator US vs EU
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4668
Loc: The Netherlands
There is some region specific stuff going on with the decimal separator.
See: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=177753&page=0
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#177758 - 2007-07-11 03:15 PM Re: Decimal separator US vs EU [Re: Mart]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
why this is in suggestions?

anyways, the behavior is feature, not a bug.
_________________________
!

download KiXnet

Top
#177774 - 2007-07-11 05:15 PM Re: Decimal separator US vs EU [Re: Lonkero]
Arend_ Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1887
Loc: Hilversum, The Netherlands
The behavior is quite normal, alot of administrative programs count on these regional settings to be setup properly.
Top
#177776 - 2007-07-11 05:29 PM Re: Decimal separator US vs EU [Re: Arend_]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Maybe a macro to find the correct sign?
Some suggestions for a name:
@DecimalSeparator
@DecSep
@Dec

Top
#177787 - 2007-07-11 06:29 PM Re: Decimal separator US vs EU [Re: Witto]
Arend_ Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1887
Loc: Hilversum, The Netherlands
 Code:
Function DecimalSeparator
  $DecimalSeparator = ReadValue('HKCU\Control Panel\International','sDecimal')
EndFunction


:P

Top
#177796 - 2007-07-11 07:43 PM Re: Decimal separator US vs EU [Re: Arend_]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
heh.
how about a udf:
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=83979
_________________________
!

download KiXnet

Top
#177809 - 2007-07-11 08:38 PM Re: Decimal separator US vs EU [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4668
Loc: The Netherlands
Ok, ok suggestions might not be the best place for this.

I guess there are several ways to get the decimal separator from the OS and use that in your script but it would be nice if kix just took the decimal symbol set in the regional settings.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#177811 - 2007-07-11 09:24 PM Re: Decimal separator US vs EU [Re: Mart]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
but that's the point.
kixtart uses exactly that decimal symbol.

and if you look at my udf, it's quite simple and does not retrieve the info from anywhere.
_________________________
!

download KiXnet

Top
#177819 - 2007-07-11 10:20 PM Re: Decimal separator US vs EU [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4668
Loc: The Netherlands
 Quote:

....
kixtart uses exactly that decimal symbol.
....


Well then maybe I just don't get it because when I runt his code:

 Code:
Break on

$dot = 2 * 1.5
?$dot

$comma = 2 * 1,5
?$comma

Sleep 5


the second calculation never works and the first one always works. No matter what I put in the regional settings?
Like I said maybe I just donít get it but thatís why I'm asking you guys to shed some light on it.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#177821 - 2007-07-11 10:27 PM Re: Decimal separator US vs EU [Re: Mart]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
well, that's just because "," is parameter separator and some more.
like in your example, array field separator.
so, what you actually do is simply:
global $comma[1]
$comma[0] = 2 * 1
$comma[1] = 5

now, if kix would use "," as decimal as you seemed to suggest...
how would one define arrays or separate parameters for function calls?

what I ment in my previous post is that when you have decimal place inside string, it gets translated to numeric with the decimal symbol of your OS.
_________________________
!

download KiXnet

Top
#177825 - 2007-07-11 11:09 PM Re: Decimal separator US vs EU [Re: Lonkero]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4668
Loc: The Netherlands
Ah it's like that. Now I get it. Thanx.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#177836 - 2007-07-12 01:08 AM Re: Decimal separator US vs EU [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4350
Loc: New Jersey
[quote=Mart]
 Quote:

Well then maybe I just don't get it because when I runt his code:


Hmm, and I thought that the problem was that Mart was RUNTing his code.. Is that slang for "deprecating"?

;\)

Glenn - glad to live in a land where commas are commas, and dots are dots - PERIOD!
_________________________
Actually I am a Rocket Scientist! \:D

Top
#177837 - 2007-07-12 02:12 AM Re: Decimal separator US vs EU [Re: Mart]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11612
Loc: CA
So can this be moved to basic forum now?
Top
#177848 - 2007-07-12 09:37 AM Re: Decimal separator US vs EU [Re: Glenn Barnas]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4668
Loc: The Netherlands
 Originally Posted By: Glenn Barnas
[quote=Mart]
 Quote:

Well then maybe I just don't get it because when I runt his code:


Hmm, and I thought that the problem was that Mart was RUNTing his code.. Is that slang for "deprecating"?

;\)

....


Damn those freaking typoís ;\)


Edited by Mart (2007-07-12 09:37 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 263 anonymous users online.
Newest Members
Thechadpma, CestMoi, MeMyselfAndI, Praveer, Ollero
17745 Registered Users

Generated in 0.077 seconds in which 0.052 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org