flat assembler
Message board for the users of flat assembler.
Index
> Main > float (single) to string? |
Author |
|
dogman 11 Sep 2013, 09:44
What OS? UNIX/Linux must have this...
|
|||
11 Sep 2013, 09:44 |
|
randomdude 11 Sep 2013, 10:34
oh... i should have posted this on windows section
|
|||
11 Sep 2013, 10:34 |
|
dogman 11 Sep 2013, 10:43
Not my thing but does this help: http://stackoverflow.com/questions/2481787/convert-float-to-lpcwstr-lpwstr
|
|||
11 Sep 2013, 10:43 |
|
AsmGuru62 11 Sep 2013, 14:30
Please take a look at FBSTP instruction here:
http://www.website.masmforum.com/tutorials/fptute/fpuchap6.htm One of uses of the instruction is to convert FPU data to a text. I think there is even a code sample in that article. |
|||
11 Sep 2013, 14:30 |
|
Picnic 11 Sep 2013, 14:57
|
|||
11 Sep 2013, 14:57 |
|
randomdude 11 Sep 2013, 19:24
thanks guys. il check the links tomorrow
|
|||
11 Sep 2013, 19:24 |
|
madmatt 12 Sep 2013, 12:44
randomdude wrote: i have searched everywhere and the only functions that i could find are for doube precision floats If your using 'printf' or 'sprintf', etc. Just 'fst' the float in a dq variable: 'myfloat dq 0.0' Then use the formatting features to output the precision that you want: Code: cinvoke printf, "%4.3f", double [myfloat] ;print to console cinvoke sprintf, addr stringbuf, "%4.3f", double [myfloat] ;print to a string buffer _________________ Gimme a sledge hammer! I'LL FIX IT! |
|||
12 Sep 2013, 12:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.