| delorie.com/archives/browse.cgi | search |
| From: | Erik Max Francis <max AT alcyone DOT com> |
| 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: | <Pine DOT SUN DOT 3 DOT 91 DOT 970313130930 DOT 6426F-100000 AT is> <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 |
| 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)
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |