Path: utzoo!attcan!uunet!munnari.oz.au!mel.dit.csiro.au!yarra!pta!teti!teslab!andrew From: andrew@teslab.lab.OZ (Andrew Phillips) Newsgroups: comp.sys.amiga.programmer Subject: Re: Good Programming stops guru |||| and BNF of C++ Message-ID: <1193@teslab.lab.OZ> Date: 24 Jan 91 07:03:58 GMT References: <4381@mindlink.UUCP> <8bXHP_y00VIFALti1O@andrew.cmu.edu> Reply-To: andrew@teslab.lab.oz.au (Andrew Phillips) Organization: Technology Evaluation Section, L.A.B., Sydney Lines: 23 In article <8bXHP_y00VIFALti1O@andrew.cmu.edu> rg20+@andrew.cmu.edu (Rick Francis Golembiewski) writes: ]int foo(A,B,C,D) ]double A,B,C,D; ]{ ]... ]foo(A,B,0,D) ]is wrong, it should be ]foo(A,B,0.0,D) ] ^ ] | ] This a a FP argument while 0 is interpreted as an integer argument,... This is why function prototypes were invented, use them! ]In general it's a good idea to initiallize ALL of your variables, as ]some compilers initalize vars to 0 while others may not. This is not true. Uninitialised static variables are *always* guaranteed to be zero. Uninitialised auto variables are *never* guaranteed to be anything. -- Andrew Phillips (andrew@teslab.lab.oz.au) Phone +61 (Aust) 2 (Sydney) 289 8712