paul@UUNET.UU.NET (Paul Hudson) (03/28/89)
Dave Hanson points out that I can get float constants rather than doubles by appending an "F". I should have explained further ... ;-). I'm in the unfortunate position of having to keep my code in a state where it can be compiled by ANSI and non-ANSI compilers. Adding #ifdef __STDC round prototypes etc is bearable, but conditionally compiling a "f" after all the floating point constants would get silly. Thus I'd like that option. Paul Hudson Snail mail: Monotype ADG Email: ...!ukc!acorn!moncam!paul Science Park, paul@moncam.co.uk Milton Road, "Sun Microsysytems: Cambridge, The Company is Arrogant (TM)" CB4 4FQ
brooks@vette.llnl.gov (Eugene Brooks) (03/29/89)
In article <8903280946.AA14743@marvin.moncam.uucp> mcvax!moncam!paul@UUNET.UU.NET (Paul Hudson) writes: > >Dave Hanson points out that I can get float constants rather than doubles by appending an "F". > >I should have explained further ... ;-). I'm in the unfortunate position of having to keep >my code in a state where it can be compiled by ANSI and non-ANSI compilers. Adding >#ifdef __STDC round prototypes etc is bearable, but conditionally compiling a "f" after >all the floating point constants would get silly. Thus I'd like that option. Then use "(float)1.2" to get a float constant. This is portable to the old compilers and in fact was the way to get the job done on quite a few of them. brooks@maddog.llnl.gov, brooks@maddog.uucp