for(;;) ; ???

How does this code provide any purpose? I don't get why you'd have a for loop with no logic in it whatsoever. :blush:

    // no point in carrying on, so do nothing forevermore:
    for(;;)
      ;

It's an infinite loop. Effectively, it stops all program execution as there is no exit from the loop. From the comment, perhaps the code has encountered some error condition from which it cannot recover, perhaps human intervention is needed, etc. This is a common use. EDIT: Interrupt service routines will still execute.

EDIT: Interrupt service routines will still execute

Very true! might even be a functional program completely based on ISR()'s

In practice the only thing you can do if your code hit this point is press the reset or switch off.
but an appropriate message to the user would be nice, e.g.

  Serial.println("Please reset device");
  for(;;);

I think I recognise that comment from one of the ethernet or wifi example sketches. It's what happens in setup if it can't initialize the networking hardware - everything else in the sketch relies on there being network comms available, so it just stops. Error msg would be nice though.

encryptor:
How does this code provide any purpose? I don't get why you'd have a for loop with no logic in it whatsoever. :blush:

    // no point in carrying on, so do nothing forevermore:

for(;:wink:
      ;

As already mentioned it does not prevent interrupts from working. As an example I have seen this form used to purposely have the watch dog timer 'time out' (assuming the WDT has been set-up and enabled properly before entering this 'endless loop' function). That is one way to force a chip hardware reset condition, effectively re-starting the whole sketch from it's beginning.

Frankly if I want to perform a 'endless loop', I would use the following form as it doesn't make me have to think about those semicolons inside the for argument list.

while(true) { }     // stay stuck in this endless loop until chip is reset or powered off

Lefty

How does this code provide any purpose? I don't get why you'd have a for loop with no logic in it whatsoever.

For practical purposes it is used to stop code execution while testing code. It appears in ethernet code to probably prevent unintended nertwork spew of request and such when the code is in a loop and not quite right.

You might terminate your loop with break, so it may not be an infinite loop. Sometimes the loop-termination condition is easiest to test in the middle of the loop body rather than the
top or bottom of the loop (which is the assumption made by while, do-while and for loops)

  for (;;) // or 'while (true)'
  {
    ...
    ...
    if (condition) break ;
    ...
    if (different condition) break ;
    ...
    ...
  }