4-30-2015
hdc dq 0
n1 dq 0
buf db ' ',0
Value db ' ',0 ; keyed in value
invoke msvcrt:_atodbl, addr n1,addr Value ;convert string to double
invoke msvcrt:sprintf_s, addr buf,sizeof buf,\
"%g",[n1]
invoke TextOut, [hdc],200,345,addr buf,10
bb = blanks on the screen
If 0010000.00 is keyed in, this is what shows up in the textout
instruction - 10000bbbbb
If 0010000.55 is keyed in, this is what shows up in the textout
instruction - 10000.5bbb
If 0010000.44 is keyed in, this is what shows up in the textout
instruction - 10000.4bbb
I am trying to show a 2 decimal place value.
Example: 0010000.88
From what I can determine the instruction msvcrt:_atodbl
is causing the problem. I have been on the Microsoft website and
the info there did not help me at all.