Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site azure.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!cornell!uw-beaver!tektronix!teklds!azure!philipl From: philipl@azure.UUCP (Philip Lantz) Newsgroups: net.lang.c Subject: Re: more about programming style Message-ID: <400@azure.UUCP> Date: Wed, 7-Aug-85 01:55:13 EDT Article-I.D.: azure.400 Posted: Wed Aug 7 01:55:13 1985 Date-Received: Sat, 3-Aug-85 03:24:27 EDT References: <441@myriasb.UUCP> Organization: Tektronix, Beaverton OR Lines: 17 > Perhaps I'm being a bit sarcastic, but could it be that the reason experienced > C programmers often use > > if ((fp = fopen("file", "r")) == NULL) ... > > is that the compiler will complain if you write > > if ((fp = fopen("file", "r")) = NULL) ... > > whereas it won't complain about > > fp = fopen("file", "r"); > if (fp = NULL) ... > > ??? Sure it will; at least PCC-based compilers will say "statement not reached".