Menu

#19 Example bidfile leaves unclear which type of decimal mark is used

v1.0 (example)
open
nobody
None
5
2014-11-08
2014-10-28
elmentz
No

I've been trying to find out, which kind of decimal mark esniper uses to parse the bidprice specified in a bidfile.
The sample_auction.txt only has examples with integer values, but what if I would like to bid i.e. 10.98 EUR or is it 10,98?
I wouldn't want to bid 1098 by accident.

Maybe you could clarify and even update the example bidfile accordingly?

Thank you in advance.

Discussion

  • Bodo

    Bodo - 2014-11-07

    I always use '.', e.g. 10.98. I don't know if 10,98 would work.
    When extracting the price from the line of the auction file, esniper accepts digits, '.' and ',', but later the text is fed into C library function atof(). Maybe the function's behavior depends on your language settings. To be sure you would have to read the documentation.

     
  • elmentz

    elmentz - 2014-11-08

    Thx Bodo, for looking into this!
    From the atof()-documentation:

    A valid floating point number for atof using the "C" locale is formed by an optional sign character (+ or -), followed by a sequence of digits, optionally containing a decimal-point character (.), optionally followed by an exponent part (an e or E character followed by an optional sign and a sequence of digits).

    So I guess it's '.' Maybe you, or anyone with repo access could update the documentation accordingly?

     

Log in to post a comment.