www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/19/02:40:15

Date: Sun, 19 Jan 1997 02:19:01 -0500 (EST)
From: Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu>
To: Daniel Boyer <boyer AT cs DOT sc DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: for loop problem
In-Reply-To: <32e11fa9.92123011@redwood.cs.sc.edu>
Message-ID: <Pine.GSO.3.95.970119021703.3673A-100000@hops.cs.jhu.edu>
MIME-Version: 1.0

On Sat, 18 Jan 1997, Daniel Boyer wrote:

> Ok, can somebody please tell me what is wrong with this line of code:
> 
> 	for(char SIX = 'a'; SIX < '}'; SIX++)

It looks like you're trying to declare a variable within the for
statement.  Change the file extension to ".cc" and compile it with gxx to
use C++, which allows such constructs.  I don't think C allows this
(though I could be wrong, and I know it _does_ allow declaring variables
within a "block").

 > { > ..... > 	}
> 
> 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?
> 
> 	Daniel Boyer
> -----
> Daniel Boyer
> boyer AT cs DOT sc DOT edu
> 
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: 2.6.2
> 
> mQCNAzLVlk4AAAEEAM+okxZsxsVtYBi7yAYj1G6eiKy3WFR8muG/WnteshJKGg53
> XWaEiroqEKI4FkwAlFfY8/vwXyFClCMu++WHwFBms5Ik7Z1bhyhRgP9XoyPQ8ZAY
> pYdoMr9g0KzDm3acCCTsZ4HbSgLJfBOzubO5ZjgFTi5eVyENSfVAKDiExlSRAAUR
> tCFEYW5pZWwgUC4gQm95ZXIgPGJveWVyQGNzLnNjLmVkdT4=
> =SBeX
> -----END PGP PUBLIC KEY BLOCK-----
> 


						---Michael Phelps
						   morphine AT cs DOT jhu DOT edu


                               CH3
                               |
                               N
                             / |
                     ______/   |
                    /      \   CH2
             _____/         \__|__      
           //     \\        /  |  \\     
         //        \\______/___CH2 \\  
          \        /       \       /
           \______/         \_____/
          / ------ \       /      \
        OH           \   /         OH
                       O
 
                   Morphine



- Raw text -


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