Mail Archives: djgpp/1999/02/11/10:30:59
From: | marg AT okstate DOT edu (Carl Marg)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Newbie Question (variable dec.)
|
Date: | Fri, 12 Feb 1999 03:06:47 GMT
|
Organization: | Oklahoma State University
|
Lines: | 18
|
Message-ID: | <36c399d2.18754602@news.okstate.edu>
|
NNTP-Posting-Host: | x8b4e504a.dhcp.okstate.edu
|
Mime-Version: | 1.0
|
X-Newsreader: | Forte Agent 1.5/32.452
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I'm using DJGPP, and I've noticed that it will not allow me to
declare variable in the middle of code, i.e
int x,y;
for (x=0;x<=10;x++) printf("%i\n",x);
for (y=0;y<=10;y++) printf("%i\n",y);
the code above would work, while below it would give me a parse error
int x;
for (x=0;x<=10;x++) printf("%i\n",x);
int y;
for (y=0;y<=10;y++) printf("%i\n",y);
what I'm wondering is this just a part of standard C,
is there some option that will change this?
Carl Marg
- Raw text -