CompuServe Thread

#Is it Lattice or Me?

8 messages in this thread
#93462From: Raja Vallee-RaiMar 9, 1990 4:30 PM
Hi guys.. I seem to have some problems with floats recently. I'm using 5.04a. Last time that I had problems, it wasn't a bug in my source(which I was going crazy, trying to find) but a bug in 5.04. Anyways, whenever I call a function, with a float as an argument, the function receives a different number. Am I doing something wrong?(Look at the following program, which prints the first a as 10.000000 and the 2nd one as 2.562500.) Or is my version which has another bug in it? #include <stdio.h> float ret(float); main() { float a; a = 10.0; printf("1st: %f\n2nd: %f\n\n", a, ret(a)); return 0; } float ret(float a) { return a; } Thanks for your help. Raja.(A novice C programmer, BTW)
#93578From: Kenny G. RabyMar 10, 1990 1:41 PM
Well, Lattice does have a new upgrade out, to 5.05 I don't remember exactly what bugs it fixes, though. I downloaded off thier BBS a week or so ago. Kenny
#93584From: Raja Vallee-RaiMar 10, 1990 1:58 PM
Hmm.. I thought so.. Well, I guess I better ask Roth for the upgrade.. Roth? You there? Raja
#93675From: Mike Roth/LatticeMar 11, 1990 12:29 AM
I'm here. The 5.05 patch is available on the Lattice BBS as file 505pch.zoo and on BIX in the Lattice listings area. If you cannot get it one of these ways, you can call Customer Service to get them to send the patch disk to you or I can EMail it to you. (I believe I still have your registration #) There will be a newer version of the 5.05 patch out soon to solve problems where some users have been unable to install it. You may want to wait until this version is ready. — Mike Roth
#93712From: Raja Vallee-RaiMar 11, 1990 9:56 AM
Hmm… well, I was able to write a script file to install 5.04a.. is it much harder than 5.04a? Raja
#93807From: Kenny G. RabyMar 11, 1990 10:42 PM
Actually it's EASIER to install than 5.04a since they include a ready-made script file with it. All I had to do was make a couple of assigns (I had the patches on my HD so I assigned the name the script file was looking for to my HD and did my normal Include etc., assigns – which I have my own script file for) then run the script file and it worked fine for me. I had the 5.04a patch installed previously, too. Anyway when you do install it, LC will still say 5.04 since it wasn't patched, but lc1 and lc2 will say 5.05 if you invoke them separately. This threw me off for a bit when I first installed the patch and the compiler still said 5.04 when I invoked it. Kenny
#93995From: Mike Roth/LatticeMar 13, 1990 12:11 AM
It should be much easier, since we have provided scripts to perform the installation for you. I recommend that you follow the instructions for creating your own patch disk. — Mike Roth
#93883From: Patrick MaloneyMar 12, 1990 10:06 AM
Raja, Are you using the cl Are you using the "lc1b"? I believe function prototyping requires that you use the large version of the compiler. I am not exactly an expert on this but I remember reading that somewhere….I also have had wierd intermittent problems with floats and printf. I would do a printf("%f\n",s) where s is a double. I would get a compiler warning about incorrct number of args and when I ran it it would just print: "%f". Wierd. PM.