edmoy@ucbopal.BERKELEY.EDU (12/11/85)
I've finally began using floating point in version 2.1a the last few weeks. For the most part, things are pretty straight forward, but I've discovered two major problems. First, it seems that you can't initialize floating points variables, as in extern double d = 1.0; The compiler accepts this, but I suppose that the initialization code that initializes all variables at runtime won't do floating point. Secondly, I'm using floating point in a control (CDEF). When I compile the control directly with my test program, it works fine. But when I make a CDEF resource and have NewControl get the function, floating point stops working. I think I've narrowed it down to the fact that floating point constants are stored as static variables, relative to A4. So even if you set A4 to a block of memory, it still hasn't been initialize to the right value. So now I trying to work around this. Has anyone had any experience with these problems? Edward Moy Academic Computing Services University of California Berkeley, CA 94720 edmoy@ucbopal.Berkeley.EDU ucbvax!ucbopal!edmoy
dtw@k.cs.cmu.edu (Duane Williams) (12/14/85)
The latest version of Megamax C is 2.1b, which fixed some problems with floating point in version 2.1a. -- uucp: ..!seismo!cmu-cs-k!dtw arpa: dtw@k.cs.cmu.edu