Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcsri!utegc!utai!garfield!john13 From: john13@garfield.UUCP Newsgroups: comp.sys.amiga Subject: Re: C-compilers for Amiga are Terrible (really Manx problem) Message-ID: <3061@garfield.UUCP> Date: Fri, 28-Nov-86 08:06:04 EST Article-I.D.: garfield.3061 Posted: Fri Nov 28 08:06:04 1986 Date-Received: Sat, 29-Nov-86 06:54:48 EST References: <8611191016.AA19776@cory.Berkeley.EDU> <1074@zen.BERKELEY.EDU> <1133@zen.BERKELEY.EDU> <9705@sun.uucp> <3060@garfield.UUCP> Sender: perry@garfield.UUCP Reply-To: john13@garfield.UUCP (John Russell) Distribution: net Organization: Memorial U. of Nfld. C.S. Dept., St. John's Lines: 24 Summary: In article <3060@garfield.UUCP> john13@garfield.UUCP (me) writes: > >main() >{ float x=1; > printf("%f\n",x); } > as an example of an improperly running program. It's since been pointed out to me that technically this *should not* work, on a C compiler that plays by the rules: it will try to assign the integer value 1 to a floating point number. This has never caused me any problems with Lattice, or with the compiler on our Unix system, and so I wasn't aware of it (haven't seen it in Kernighan and Ritchie either). So main() { float x = 1.0; printf("%f\n",x); } should work, right? Wrong! I tried this too and again it just printed the letter f. So please, no flood of replies saying "force it to float with a decimal point!". John