Posted By: skeu
Export floats into txt file - 09/09/10 10:23
Hello to all,
i would like to ask if there is any possibility to export the floats with all decimals?
Thanks in advance
Posted By: Saturnus
Re: Export floats into txt file - 09/10/10 15:03
I assume that this is a possibility:
file_str_write(file_handle, str_for_float(NULL, 12.345678));
Posted By: jcl
Re: Export floats into txt file - 09/13/10 08:54
The best method for exporting floats is just writing them binary into a file, f.i.
float myfloat = 3.14;
file_str_write(handle,(char*)&myfloat,4);
The second-best method is writing them as ASCII like Saturnus suggested, or using the str_printf function.