From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP inconsistencies? Date: Thu, 13 Mar 1997 20:35:55 -0800 Organization: Alcyone Systems Lines: 23 Message-ID: <3328D5AB.25CBAFEC@alcyone.com> References: <33280F93 DOT B9B AT uxa DOT ecn DOT bgu DOT edu> <5g9pat$fac AT netra DOT montana DOT edu> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Paul Peavyhouse wrote: > char *str; > if ( (str = getenv("DEM_PATH")) == NULL) { > printf("'DEM_PATH' environment variable not set\n"); > exit(1); > } > BITMAP *buffer; <-- Parse error on THIS line > > If I move BITMAP *buffer before the "if" statement, the compiler > is > all happy...WHY? Thanks anyway for the reply. Because it's illegal C. In C all declarations must occur _before_ any statements. -- Erik Max Francis, &tSftDotIotE / email: max AT alcyone DOT com Alcyone Systems / web: http://www.alcyone.com/max/ San Jose, California, United States / icbm: 37 20 07 N 121 53 38 W \ "I am become death, / destroyer of worlds." / J. Robert Oppenheimer (quoting legend)