Liste des Groupes | Revenir à cl c |
bart <bc@freeuk.com> writes:On 16/04/2025 06:35, Janis Papanagnou wrote:>
So here, 0% of such loops have a step other than 1. THAT's what I mean
by 'unusual'.
Sample bias.
>
Scot Lurndal gave examples comparing C with BASIC/FORTRAN that used
steps other than one, to back up a claim that they routinely use 3
components. Actually they rarely do.
I made no such claim. You said that for loops were not three-way
constructs - I showed that was not an accurate statement. I made
no claims about anything being 'routine'.
A common construct:
entity *ep = entities[0];
for(size_t i = 0ul; i < MAX_ENTITIES; i++, ep++) {
ep->field = do_something(args);
}
in C++
for(x = map.begin(); x != map.end(); ++x) {
/* process a red-black tree element */
}
Les messages affichés proviennent d'usenet.