This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bool and gcc


On Mon, 10 Aug 1998, Inquisitor Nikodemus wrote:

> Does gcc (egcs exactly) support boolean (bool) type?

Of course, and has for years. Why do you ask? (it's as simple as writing 
a trivial program to check). 

> What's that "new ANSI 'for' scoping" ?

Not that "new" anymore -- it's been around for years. In the following 
piece of code, the scope of "i" is the for loop, and i is not visible 
outside.

  for (int i = 0; i < some_value; ++i)
    {
      // ...
    }
  // i is now out of scope, sorry.

G++ provides an "backward compatibility" flag, -fno-for-scope, for code 
written years ago and hasn't been fixed yet.

As for the answers to the rest of your post, please get some books on C 
and/or C++ (and/or visit comp.lang.{c,c++} where this discussion would be 
more relevant). There are FAQ's for those groups as well which are very 
useful for beginners (and even though veterans don't like to admit it, 
they peek at those every so often as well!).

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]