Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!tektronix!hplabs!sri-unix!BLARSON@USC-ECLB.ARPA From: BLARSON@USC-ECLB.ARPA Newsgroups: net.lang.c Subject: Re: summary of C-standards workshop at Usenix Message-ID: <1793@sri-arpa.UUCP> Date: Mon, 9-Jul-84 20:47:48 EDT Article-I.D.: sri-arpa.1793 Posted: Mon Jul 9 20:47:48 1984 Date-Received: Fri, 13-Jul-84 03:22:59 EDT Lines: 25 From: Bob Larson One possible syntax for a float constant (as opposed to a double constant) is like this: foo = foo + (float) 1.0; This would work on current compilers as well as ones that did all float arithmetic in single precision. The only disadvantages are reduced accuracy on some machines without saving time, and even more wasted time for compilers that do casts of constants at runtime. The other possibility is using the declared (typed) constant like: const float one = 1.0; ... foo = foo + one; but this has less compatibility with current compilers. Another suggestion is to have a symbol predefined (perhaps ANSI) if it is an ansi c compiler for conditional compilation. Bob Larson -------