December 11, 2024, 09:16:06 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Converting floating-point into a string results in "f"

Started by BJ, March 31, 2011, 09:57:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BJ

With the latest release run this.  Each will output "f" if it has a mantissa > 0, with or without optimizations on.  It works just fine with the release directly preceding this one.

DOUBLE d = 1.1
PRINT STR$( d )
d = 1.0
PRINT STR$( d )
PRINT

FLOAT f = 1.1
PRINT STR$( f )
f = 1.0
PRINT STR$( f )
PRINT

PRINT STR$( 1.1 )
PRINT STR$( 1.0 )


EDIT:
Found the actual issue.  It was caused by this code: $USE "ntdll.lib"

talun

Works fine here (no "f" in the output).

Have you updated your compiler version?

Sergio

BJ

There's a new one uploaded on "Mar 30, 8:17".  Just in case I was wrong I downloaded it again.  I get the same issue.

Cheers.

LarryMc

Works fine for me with same download version in XP SP3

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

BJ

Geez.  You're right.  I deleted the "iwbdev" folder entirely then reinstalled, now everything is fine.

My mistake.  Sorry.  I am not sure what I did at some point.   :-[

EDIT:

Actually, I found out what caused it.  I had installed the old ccProject.incc into the bin folder.
This contains the line: $USE "ntdll.lib", which is the problem for me even with a fresh install.

LarryMc

The important thing is you got it resolved. ;)

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library