U++ framework
Do not panic. Ask here before giving up.

Home » U++ TheIDE » U++ TheIDE: Packages » atof trucates real number with a dot but not comma on Linux
Re: atof trucates real number with a dot but not comma on Linux [message #13661 is a reply to message #13528] Sat, 19 January 2008 15:11 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 826
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Allright, I found a shortcut.
Just forget about atof.

double number = UPP::ScanDouble("12.34");


The ScanDouble is hardcoded to search for dot, so it will ignore system locales.

Quote:

it means that this toolkit is unusable for me (and for many people because i don't knoaw why somebody wants atof to work with comma....)


It's actually the toolkit's function you should have looked for, and it would fix your troubles. Wink Very Happy
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: UVS2 usage
Next Topic: vsprintf() doesn't support "%I64u" format in Win32 platform?
Goto Forum:
  


Current Time: Fri Jul 17 21:53:29 GMT+2 2026

Total time taken to generate the page: 0.00539 seconds