buggnubg - Bugs: bug #24880, Inconsistent numeric separators...

 
 

bug #24880: Inconsistent numeric separators for input and output of float parameters

Submitted by:  Ingo Macherius <inim>
Submitted on:  Wed 19 Nov 2008 09:55:35 PM UTC  
 
Originator Name: inimItem Group: Other bug
Category: Command line interfaceRelease: 0.16-devel
Privacy: PublicOperating System: Linux
OS Type: NoneProcessor Type: None
Severity: 3 - NormalOpen/Closed: Closed
Assigned to: NonePriority: 5 - Normal
Status: Works For Me

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 19 Nov 2008 10:53:33 PM UTC, comment #1:

Ah, have to add that I connect STDIN/STDOUT of a program to gnubg and parse the output. That's why the inconsistency showed a a bug for me.

Ingo Macherius <inim>
Wed 19 Nov 2008 09:55:35 PM UTC, original submission:

Platforem: gnubg built from SNAPSHOT-20081117 sources on Ubuntu 8.04LTS (latest patchees applied, german locale) with all settings left default.

When using the commandline version, there is an inconsistency with the numeric separator. For output, it seems to use the LOCALE's separator (in my case the comma as used in germmany). However, when parsing input values, it seems to ignore the LOCALE and fall back to the decimal point.

My personal preference would be to always use the decimal point, otherwise batches written in gnubg command language may not be portable between users with different LOCALEs.

Example session, with ### denoting comments

(gnubg) hint
1. Cubeful 2-ply 13/9(2) 6/2(2) Eq.: +0,930
0,712 0,238 0,014 - 0,288 0,061 0,001
2-ply cubeful prune [world class]
### [...]
9. Cubeful 2-ply 6/2(4) Eq.: +0,084 ( -0,845)
0,515 0,159 0,006 - 0,485 0,117 0,002
2-ply cubeful prune [world class]
### All output uses the decimal comma
### Now change a setting which takes a float parameter
(gnubg) set evaluation movefilter 2 1 99 99 0,16
You must set a count of extra moves and a search tolerance
(see `help set evaluation movefilter').
### Error message! However, use a decimal point and all is fine
(gnubg) set evaluation movefilter 2 1 99 99 0.16
### Executed, no message

I haven't checked other commands than the two given in the session example.

Ingo Macherius <inim>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by c_anthon (Updated the item)
  • -unavailable- added by inim (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 09 Dec 2008 01:05:42 PM UTCc_anthonOpen/ClosedOpen=>Closed
      StatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1