I'm working on some C# code that has loop syntax that I've never seen before:
for (;;)
{
//Do some stuff
}
What does a for loop without a init; condition; or increment do? By the way it's really hard to find meaningful search results on the internet for "for (;;) c#" on any search engine I tried.
-Eric
If null is null then keep going. At the end , null + nullis how I've always read. It's an infinite loop, if I'm not mistakenwhile(true)because that explicitly states the infinite-loop condition (andwhileconditions are not optional).#define EVER ;;that allowed you to writefor(EVER) { /* code */ }). I remember seeing it a lot in 80's era C code, not so much in early 90s C and C++ code and very rarely in the last decade or two. Yeah, I'm that old, but I'm guessing the person who wrote the code you are looking at is old as well