|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.learn - din.readf("%s", &floattype) should work?
Is din.readf (from std.cstream in Phobos) able to read floats when using %s as the format specifier? When I used this: din.readf( "%s", &somedouble ); somedouble will still be nan after receiving input from the user. But when I use: din.readf( "%f", &somedouble ); everything goes as planned. Is this to be expected? Jan 29 2010
Michael P. wrote:Is din.readf (from std.cstream in Phobos) able to read floats when using %s as the format specifier? When I used this: din.readf( "%s", &somedouble ); somedouble will still be nan after receiving input from the user. But when I use: din.readf( "%f", &somedouble ); everything goes as planned. Is this to be expected? Jan 29 2010
|