Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!umnd-cs!umn-cs!hyper!dean From: dean@hyper.UUCP (Dean Gahlon) Newsgroups: comp.sys.cbm Subject: Re: C Power 128 query Message-ID: <264@hyper.UUCP> Date: Mon, 18-May-87 11:01:47 EDT Article-I.D.: hyper.264 Posted: Mon May 18 11:01:47 1987 Date-Received: Tue, 19-May-87 06:18:48 EDT References: <1861@rutgers.rutgers.edu] Organization: Network Systems Corp., Mpls. MN Lines: 35 in article <1861@rutgers.rutgers.edu], prindle@nadc says: ] ] Has any user of "C Power 128" been able to obtain the fix to the "floating ] point to integer conversion problem"? Supposedly, it has been fixed by the ] author, but I just can't seem to locate the fix (I believe it would be in ] library function "conv52" or "cnvfi"). Briefly, the problem is: ] ] main() ] { ] int i; ] float f; ] ] f=123.4; ] i=(int)f; /*the (int) is optional in this case*/ ] printf("i=%d\n",i); /*should print 123*/ ] } ] ] prints garbage for "i"! I wrote to the company describing this and many other ] bugs in "C Power 128". All other significant bugs were fixed and the repaired ] files posted to the C Power BBS. Not so the fix to the bug above. Any ] clues? I've come up with a partial fix for this problem, but there seem to be other problems with floating point. (The partial fix was to call the correct BASIC ROM routine -- the routine which the existing libraries call does NOT leave its result in the A and Y registers (even though its name in Commodore documentation leads one to believe this), and the code in the library expects it to do so. ) On another note, does anybody out there know about what C-power 128's problem with regard to scanf/fscanf/sscanf of hex numbers is? It doesn't seem to work right, yet I've looked at the library code, and can't seem to find anything wrong. Dean C. Gahlon ...ihnp4!umn-cs!hyper!dean