delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/18/20:14:17

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: for loop problem
Date: Sat, 18 Jan 1997 16:53:27 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 30
Message-ID: <32E17087.5F6A@cs.com>
References: <32e11fa9 DOT 92123011 AT redwood DOT cs DOT sc DOT edu>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp108.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Daniel Boyer wrote:
> 
> Ok, can somebody please tell me what is wrong with this line of code:
> 
>         for(char SIX = 'a'; SIX < '}'; SIX++)
>         {
>         .....
>         }
> 
> I keep getting a "parse error before ; "  and if has to be in this
> line of code (there are only about three lines before it and they ARE
> correct.  I have a number of lines like this one in the program and
> all of them are getting this error?   What am I over looking?

Well, when I try compiling it, I get a "parse error before char", and
lots of other errors besides.  That isn't valid C code.

I tried compiling it as C++ and got no errors, with a suitable statement
filling in the body of the for loop.

Is that example pasted in verbatim from your code?  If not, could you
please do so?

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
| "Starting flamewars since 1993"  |   http://www.cs.com/fighteer   |
|  *** NOTICE ***  This .signature is generated randomly.           |
|                  If you don't like it, sue my computer.           |
---------------------------------------------------------------------

- Raw text -


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