>>> for (int i=1; i<10; i++) { // do some stuff... }
>>> for (int i=1; i<10; i++) { // do some other stuff... }
>
>> um, but isn't that illegal C++?  you're redeclaring the variable.
>
> No, the original poster is correct. If a variable is declared within
> the initializer part of the 'for' statement, the variable's scope
> is until the end of the 'for' statement. Ref: "The C++ Programming
> Language", section 6.3.3.1.

My goal was not to start a flame war. I use the latest "features" of C++
because they make my life easier and don't hinder readability. And also
because my compiler supports it, of course. But, obviously, some of these
constructs have to be avoided when changing compiler.

>> i'm saying i'm thankful that the compiler complains about illegal
>> code ...
>
> But it should accept legal code. =-) Anyway, we all know that
> supporting multiple compilers (and multiple versions thereof)
> can be very difficult. So since VC++ is the most widely used
> compiler on Windows by far, I personally agree with Palm's
> decision that VC++ should be the targeted environment.

I did not delve in the CDK on Windows, but since MFC's _do_ compile with
CodeWarrior on Windows (I use this myself), I guess that with some tweaking
it may be possible to develop conduits without VC++ (and of course without
wizards, but I do consider this a good thing :-))

--
Florent Pillet, Code Segment       [EMAIL PROTECTED]

BrainForest, outlines and action items for Palm OS handhelds
   -> Aportis Technologies Corp.     http://www.aportis.com/
PowerGlot, the premier localization tool for Mac OS software
   -> PowerGlot Software           http://www.powerglot.com/
Palm Buddy, MacOS active link companion for PalmOS handhelds
   -> ...and other tools... http://perso.wanadoo.fr/fpillet/

Reply via email to