hey wait a minute.
>This is a real nuisance, because as observed, it makes
>for-loops non-modular. You can't portably copy/paste a for-loop
>within the same enclosing block.
>This means you have to go back to C conventions of
>putting the variable declaration at the beginning
>of the block, effectively.
that's not quite accurate. consider the following, which makes the for loop
self-contained, and also happens to ENFORCE that the lifetime of "int i"
does not go past the for loop (which causes a separate problem, but the
problems are mutually exclusive).
{
for (int i; blah blah; blah blah)
{
blah blah
}
}
just add the braces around it! then copy-paste the outer braces as well.
- Re: Visual C++ 6.0 and CDK 3.0 Dave Lippincott
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Ade Barkah
- Re: Visual C++ 6.0 and CDK 3.0 Bryon Lape
- Re: Visual C++ 6.0 and CDK 3.0 Florent Pillet
- Re: Visual C++ 6.0 and CDK 3.0 Christian Vandendorpe
- Re: Visual C++ 6.0 and CDK 3.0 Chris Antos
- Re: Visual C++ 6.0 and CDK 3.0 Aaron Ardiri
- Re: Visual C++ 6.0 and CDK 3.0 Ade Barkah
- Re: Visual C++ 6.0 and CDK 3.0 Michael Yam
- Re: Visual C++ 6.0 and CDK 3.0 Chris Antos
- Re: Visual C++ 6.0 and CDK 3.0 Alan Kennington
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Bryon Lape
- Re: Visual C++ 6.0 and CDK 3.0 Jean Cyr
- Re: Visual C++ 6.0 and CDK 3.0 Florent Pillet
