Hello!
I need to convert two strings to floating point numbers, then compare them to get the lowest. The follwoing code doesn't work however...
szNum1 db '0.1457',0
szNum2 db '0.1568',0
...
fpNum1 QWORD ?
fpNum2 QWORD ?
...
invoke StrToFloat, addr szNum1, addr fpNum1
invoke StrToFloat, addr szNum2, addr fpNum2
.if fpNum1 > fpNum2 ; compiler doesn't like this
.else
.endif
...
You assistance will be greatly appreciated!!
Hi georgek01,
the comparison will not work that way.
You have to do that manually yourself via the FPU or you can use the FpuComp Function which comes in a library with the MASM32 package.
For details regarding FpuComp I suggest you have a look into \masm32\help\fpulib.hlp.
Regards
Thanks mnemonic for the response. :U
I'll have a look there.