Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site ho95e.UUCP Path: utzoo!watmath!clyde!cbosgd!cbdkc1!desoto!cord!hudson!bentley!hoxna!houxm!ho95e!wcs From: wcs@ho95e.UUCP (x0705) Newsgroups: net.lang.c Subject: Re: Help Message-ID: <184@ho95e.UUCP> Date: Mon, 26-Aug-85 11:47:33 EDT Article-I.D.: ho95e.184 Posted: Mon Aug 26 11:47:33 1985 Date-Received: Tue, 27-Aug-85 06:25:07 EDT References: <248@proper.UUCP> <965@brl-tgr.ARPA> Organization: AT&T Bell Labs, Holmdel NJ Lines: 30 > > When ever I attempt to compile the Fahrenheit-Celsius table program (on pg > > 8 of _The C Programming Language_) I > > get this error: > > "temp.c", line 8: warning: old-fashioned initialization: use = > > > > The line of code is: > > lower = 0; /* lower limit of temperature */ > > > > Could someone tell me what I'm doing wrong? > > No, because you didn't supply enough information. > The program in the book is okay, so the error must be > in your code. Check the line or two above where the > compiler detects the problem. Especially check for > extra/missing { } /* */ ; The error message you got is normally caused by using constructs that resemble some of the "old-fashioned" language constructs. For example: foo=-40; used to mean foo -= 40, instead of foo = (-40). Several generations of compilers since then have code to reject "old-fashioned" constructs, even though they're otherwise perfectly legal. I this case, I'd check to make sure "lower" has been declared, as a scalar (int or double?), and that you don't have any more variable declarations after it. (Since you can't mix decl.'s and executables, the compiler may be trying to get out of a bad situation, and guessing wrong about the error. Also, as Doug suggests, watch for extra/missing delimiters. -- ## Bill Stewart, AT&T Bell Labs, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs