WojciechRynczuk / vcdMaker

A tool for converting text log files to the VCD format.
https://vcdmaker.org
MIT License
29 stars 2 forks source link

Parse comma separated floats #64

Open WojciechRynczuk opened 5 years ago

WojciechRynczuk commented 5 years ago

In some regions of world people use comma as the separator for float numbers. The user log format parser shall take that into account. How about adding another function 'fltc()'?

endrjux commented 5 years ago

Can't we just recognize both . and , without additional function?

WojciechRynczuk commented 5 years ago

Good question. I just thought that we could reduce the overhead. atof() accepts just a point .. We could automatically convert strings to doubles for the flt() function. fltc() would replace , with . in the first place and then do the conversion.

Still to be decided what we do.

WojciechRynczuk commented 4 years ago

A simple change in PARSER::FloatResult::FloatResult() shall be sufficient. It would be also good to provide a test.

E.g.

#10 FloatNumber 2,56
#20 FloatNumber 3,14
#30 FloatNumber 9.27

Documentation shall be updated,