Home » Developing U++ » U++ Developers corner » Interesting: with GTK backend, strtod does not work (correctly)  
	
		
		
			| Interesting: with GTK backend, strtod does not work (correctly) [message #44451] | 
			Fri, 13 March 2015 09:36  | 
		 
		
			
				
				
				  | 
					
						  
						mirek
						 Messages: 14271 Registered: November 2005 
						
					 | 
					Ultimate Member  | 
					 | 
		 
		 
	 | 
 
	
		
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
GUI_APP_MAIN
{
	DDUMP(strtod("3.5", NULL));
}
 
 
strtod("3.5", __null) = 3
 
 
Perhaps something that GTK does to locale is to blame, but strange anyway as I have en-us... 
 
In any case, fix is simple: Use ScanDouble instead. But worth knowing anyway...
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 05:29:49 CET 2025 
 Total time taken to generate the page: 0.11869 seconds 
 |