delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/13/16:14:17

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: variable declaration in for-header fails??
Date: 13 Jan 2000 11:58:07 -0800
Organization: InterWorld Communications
Lines: 26
Message-ID: <83n1q97nhs.fsf@mercury.st.hmc.edu>
References: <387d91d5 DOT 333064 AT news DOT netcologne DOT de>
NNTP-Posting-Host: mercury.st.hmc.edu
X-Trace: nntp1.interworld.net 947793440 81302 134.173.45.219 (13 Jan 2000 19:57:20 GMT)
X-Complaints-To: usenet AT nntp1 DOT interworld DOT net
NNTP-Posting-Date: 13 Jan 2000 19:57:20 GMT
X-Newsreader: Gnus v5.7/Emacs 20.4
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

karpfenteich AT gmx DOT de (Peter Karp) writes:

> Hi  :-)
> 
> I have a little question, why DJGPP can't compile a program where I've
> defined a counter in the for loop (which is better, as the counter is
> "more local" then, right?).
[snip code]
> BTW, Borland C++ 3.1 compiles this version without an error, while
> DJGPP gives the following error message:
[snip error]

I think this may be an FAQ somewhere.  As I recall, there was a change
in the C++ specification somewhere along the line with regard to how
this is handled.  DJGPP presumably uses the current spec, while
Borland's would be older.

The easiest solution is "don't do that"; just use the code that
works.  If you're still interested, you might post to comp.lang.c++
where they will know all the gory details.


-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019