i have

sprintf PROTO C :PTR BYTE, :PTR BYTE, :VARARG

.data
bignum REAL10 5000000000000000000.0  ;5.e18
floatformat db "%f",0
output db 60 dup(0)

.code
invoke sprintf, offset output, addr floatformat, bignum
but the output isnt: "5000000000000000000" but something like "-0.000000" i debugged it my app and i see it doesnt push REAL10 ptr bignum, but only dword ptr... (also tried: invoke sprintf, offset output, addr floatformat, real10 ptr bignum) can somebody please help me out? ... please
Posted on 2001-06-14 10:23:00 by Guest
Did you try without the INVOKE :

push tword ptr bignum
push offset floatformat
push offset output
This message was edited by karim, on 6/14/2001 11:24:50 AM
Posted on 2001-06-14 11:19:00 by karim
im getting a: error A2070: invalid instruction operands doesnt get: push real10 ptr bignum push qword ptr bignum :(
Posted on 2001-06-14 13:19:00 by Guest
Try this :

fld   bignum             
sub   esp, 10
fst   qword ptr 
push  offset floatformat
push  offset output
call  sprintf
add   esp, 18
Posted on 2001-06-14 14:49:00 by karim