1726
submitted 2 years ago by 5SpeedDeasil@lemmy.world to c/memes@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] ChrislyBear@lemmy.world 1 points 2 years ago* (last edited 2 years ago)

I disagree. It's a while loop, because a for-loop is finite, so you can't count to infinity with it.

[-] Pitri 10 points 2 years ago

there is no reason for a (non-foreach) for loop to be any more or less finite than a while loop.

for (a; b; c)
{
  d;
}

is just syntactic sugar for

{
  a;
  while (b)
  {
    d;
    c;
  }
}

in most or all languages with c-like syntax.

load more comments (3 replies)
this post was submitted on 16 Jul 2023
1726 points (100.0% liked)

Memes

51527 readers
1377 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 6 years ago
MODERATORS