"for" loops in C ...

Greg Limes limes at ouroborous
Thu Oct 20 08:16:40 AEST 1988


In article <6945 at cdis-1.uucp>, tanner at cdis-1 (Dr. T. Andrews) writes:
>It is unwise to depend on "for" loops in portable
>code.  Use a "while" loop instead.
 
In article <73408 at sun.uucp> limes at ouroborous (Greg Limes) writes:
>Dr. Andrews, can you provide an example of a compiler in common use that
>manages to get the for loop wrong?

In article <23299 at amdcad.AMD.COM>, tim at crackle (Tim Olson) writes:
>Didn't anyone else see what Dr. Andrews was pointing out?  Saying that
>you should avoid the construct 1["string"] is *like* ...

I may have put my foot in the middle of that one, but maybe not. On the other
hand, it is easier to simply say that I was asleep at the keyboard, then to
point out the basic difference between getting a "for" construct wrong
(something basic to the language and hard to get wrong) in a compiler, and
failing to support subscripting an integer by a pointer (something a bit less
basic, and in fact rather arcane, that may fall by the wayside if there are a
lot of complex issues about pointers).

So, sorry for being asleep at the keyboard.
-- 
Greg Limes [limes at sun.com]		semper ubi, sub ubi



More information about the Comp.lang.c mailing list