|
|
|||||||
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 |
||||||||
|
|
|||||||
why this is in suggestions? anyways, the behavior is feature, not a bug. |
||||||||
|
|
|||||||
The behavior is quite normal, alot of administrative programs count on these regional settings to be setup properly. |
||||||||
|
|
|||||||
Maybe a macro to find the correct sign? Some suggestions for a name: @DecimalSeparator @DecSep @Dec |
||||||||
|
|
|||||||
Code: Function DecimalSeparator $DecimalSeparator = ReadValue('HKCU\Control Panel\International','sDecimal') EndFunction :P |
||||||||
|
|
|||||||
heh. how about a udf: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=83979 |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
Ah it's like that. Now I get it. Thanx. |
||||||||
|
|
|||||||
[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! |
||||||||
|
|
|||||||
So can this be moved to basic forum now? |
||||||||
|
|
|||||||
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 |