Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C
#define forever while(1)
forever {
	// Do something
}

forever can be defined as a preprocessor constant to improve readability.

You may remove the curly braces if the block is only 1 instruction.
loop:
	goto loop;
while(1){
	// Do something
}

You may remove the curly braces if the block is only 1 instruction.
for(;;){
	// Do something
}

You may remove the curly braces if the block is only 1 instruction.
loop
   null;
end loop;

null; means "do nothing"

New implementation...
< >
programming-idioms.org