You must log in or register to comment.
found the following in our codebase the other day.
while(booleanFlag) return;
thhere wasn’t more in the loop body, that was it. the loop conditional does exist and it can hurt you.
Through the magic of make, you can write code that changes if statements to while loops then changes it back after compilation passes or fails.
I only give good advice.
10 print “All Work, No Play”
20 goto 10
30 end
I once went to the computer of a class mate and opened
stdio.h
and added#define while(x) if(x)
. He was so confused. 🤣int main() { useless: int x = 10; if (1) { goto useless; } }
Yea, I saw C style and was disappointed when it didn’t abuse gotos.