Path: utzoo!utdoe!generic!pnet91!ericmcg From: ericmcg@pnet91.cts.com (Eric Mcgillicuddy) Newsgroups: comp.sys.apple2 Subject: Re: Help with Floats in Hyper C Message-ID: <879@generic.UUCP> Date: 23 Jun 91 14:45:04 GMT Sender: root@generic.UUCP Organization: People-Net [pnet91], Etobicoke, ON Lines: 26 >Your comments about what is required to produce legal C code are simply >not correct...you can check with either K&R, the ANSI C specification, >or various other C reference materials. You should not need to convert >a float to an int in an assignment, nor should you have to convert an >int to a float in order to perform floating point arithmetic. That you >have to in order to produce executable code for Hyper C means that Hyper >C is a seriously deficient implementation of the language. >-- Charles William Swiger > cs4w+@andrew.cmu.edu I am not referring to legal C code, I am referring to HyperC C code. Most C compilers will adjust the variables on the fly, however explicitly casting them to identical types should not affect the compiler, and it has the added advantage of letting everyone know you know what is going on. HyperC is intended to use integer math only, the memory cost for floating point is horrendous. The basic version has no FP support whatsoever, however a floating point library was added later. Note that the compiler was not changed, only the preporcessor, so floats must be treated explicitly as some combination of more basic types, strings in this case I believe. It should be possible to write HyperC code that is portable to any other C compiler, but the reverse is not neccessarily true. UUCP: bkj386!pnet91!ericmcg INET: ericmcg@pnet91.cts.com