I tried to come up with a better term when I started using that. The runner-up for me was while (ALWAYS) {} The most succinct is while (1) {}hgm wrote:If you don't like 'break', it is easily avoidable at the price of some extra indentation:'while(FOREVER)' sounds linguistically broken. I would prefer 'for(EVER)' or 'while(UNBROKEN)'.Code: Select all
do { int success = read_some_input(); if(success) { process_input(); } } while(success);
I have even seen some use a #define loop "while (1)" so that you end up with loop {};
Ditto for "repeat".
Really is not a perfect syntax in C to express an infinite loop with an internal exit, unfortunately.