FROM : Uli Kusterer
DATE : Sun Apr 20 16:20:01 2008
Am 20.04.2008 um 11:45 schrieb Jean-Daniel Dupas:
> I greatly prefere the C99 way to do it. It prevents variables
> conflict if you have more than one loop in your method.
>
> for (int idx = 0; idx < maxCount(); idx++) {
>
> }
Yeah, I like that, when I can use it. It's just not always possible,
and sometimes you want several loops to share a counter.
Besides, it wouldn't have illustrated the point I was trying to
make, that I always initialize variables, even if I'll be smashing
their value right thereafter. Maybe I should have gone with:
BOOL success = NO;
success = [[NSFileManager defaultManager] changeCurrentDirectoryPath:
@"/"];
or whatever.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
DATE : Sun Apr 20 16:20:01 2008
Am 20.04.2008 um 11:45 schrieb Jean-Daniel Dupas:
> I greatly prefere the C99 way to do it. It prevents variables
> conflict if you have more than one loop in your method.
>
> for (int idx = 0; idx < maxCount(); idx++) {
>
> }
Yeah, I like that, when I can use it. It's just not always possible,
and sometimes you want several loops to share a counter.
Besides, it wouldn't have illustrated the point I was trying to
make, that I always initialize variables, even if I'll be smashing
their value right thereafter. Maybe I should have gone with:
BOOL success = NO;
success = [[NSFileManager defaultManager] changeCurrentDirectoryPath:
@"/"];
or whatever.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
| Related mails | Author | Date |
|---|---|---|
| Jerry Krinock | Apr 19, 18:46 | |
| Bill Bumgarner | Apr 19, 20:24 | |
| Jerry Krinock | Apr 19, 22:10 | |
| Ali Ozer | Apr 20, 00:11 | |
| Uli Kusterer | Apr 20, 01:03 | |
| Jean-Daniel Dupas | Apr 20, 11:45 | |
| Uli Kusterer | Apr 20, 16:20 | |
| Clark Cox | Apr 20, 17:40 |






Cocoa mail archive

