Author Topic: sim-costs are rounded down. CLOSED (WON'T FIX)  (Read 3039 times)

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
sim-costs are rounded down. CLOSED (WON'T FIX)
« on: November 07, 2007, 05:39:18 AM »
Anytime I change a cost in the cost tab, all costs lower then one are being rounded down do zero.

If I open physcics and costs , then go to custom simulation costs, I change a random value, click on okay and after it, I click on custum simulation costs, now you see all values lower then 1 being rounded down to zero.

Also happening when I use dynamic costs.

Using 2.43P but it is happening in other versions too.
« Last Edit: November 07, 2007, 11:29:34 AM by EricL »
Oh my god, who the hell cares.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
sim-costs are rounded down. CLOSED (WON'T FIX)
« Reply #1 on: November 07, 2007, 11:03:00 AM »
This looks like the good old problem with different country set ups for values in the OS. I had problems with this for half a year before I discovered that you need to go to 'Control panel -->national settings' (not sure exactly how it is named for different languages) and change the decimal value from ',' to '.' without the quotes. Hopefully this will help.
« Last Edit: November 07, 2007, 11:03:58 AM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
sim-costs are rounded down. CLOSED (WON'T FIX)
« Reply #2 on: November 07, 2007, 11:21:33 AM »
Well, suprisely it really works, thanks Testlund, I wouldn't have figured that out myself, changing someting in windows has effect on darwinbots. I am having te trouble for some time. Finally solved.
Thanks  

As the ',' decimal value is standard in windows, well atleast mine. Could it not be better if instead of a '.' a ',' is standard used. I think the idea of changing anything in windows to fit good for darwinbots is strange and would be if it where the other way around.
Oh my god, who the hell cares.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
sim-costs are rounded down. CLOSED (WON'T FIX)
« Reply #3 on: November 07, 2007, 11:28:48 AM »
This won't be fixed in the VB version due to limitations in VB's handling of interntional formats and separators.  I'm simply too lazy to write a custom text control or change everything over to an existing one.  I'll continue to look for an easy fix, but for now this is a won't fix bug.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
sim-costs are rounded down. CLOSED (WON'T FIX)
« Reply #4 on: November 07, 2007, 04:41:44 PM »
When you first set up windows, it asks you for a regionalization setting.  What country are you from, time zone, etc.  This sets up lots of different settings, including wether to use , or . for decimals, and how to seperate thousands from hundreds.

In America, (where most DB coders are from), numbers look like this:

"100,000.36" which reads as 100 thousand and 36 hundredths.

The same number in most of europe probably looks like this:
100 000,36 or even 100.000,36

This problem wasn't something I understood until quite a while after I started coding for DB.  There are places in the code that explicitly assume that decimals are XXX.XXX, and there are other bits that use VB to determine which to use, and VB bases it's decision on the windows regional settings.

It's not getting fixed anytime soon because it would require basically going over all the GUI code, text literals, etc.  It's just too big a task.

However, the good news is that this is handled very well in the .NET framework, so any code based on it for DB 3 will allow for international settings.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
sim-costs are rounded down. CLOSED (WON'T FIX)
« Reply #5 on: November 07, 2007, 05:39:49 PM »
Looked up in wipidedia  .
Quote
De Nederlandse schrijfwijze van een groot getal is: 123.456,789
De Angelsaksische schrijfwijze is: 123,456.789
De ISO-standaard (31-0) schrijfwijze is 123 456,789

Translation, don't you even know dutch.  

dutch: 123.456,789(prob, some other countrys too)
english:123,456.789(So including all countrys where english is the first languege)
international:123 456,789(standard all over the world, it is official)

Now I have learned something about decimal signs.
Oh my god, who the hell cares.