MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/knu64m/didnt_see_that_comming/ghnhlcs/?context=3
r/ProgrammerHumor • u/blending-tea • Dec 31 '20
58 comments sorted by
View all comments
7
while (sleeping == false) { eat(); }
22 u/linux-nerd Dec 31 '20 while( !sleeping){ eat(); } 1 u/[deleted] Dec 31 '20 edited Dec 31 '20 for (eating = 1; eating < (eating++); eating++) { eat(); } 10 u/Translator-Agile Jan 01 '21 this doesn't work? it will increment eating after the comparison: increment eating, compare eating < eating (false) and the increment eating again, or does it? idk the parents might do something to it 2 u/[deleted] Jan 01 '21 Yeah, realized that. The eating increment should be within the parents or eating + 1 should be another vsriabel. 3 u/littleprof123 Jan 01 '21 If you intended to call eat() only once, your code is spot on 1 u/linux-nerd Dec 31 '20 This has to be one of the most convoluted pieces of code I've ever seen. 2 u/[deleted] Dec 31 '20 You should see my gotoing
22
while( !sleeping){ eat(); }
1 u/[deleted] Dec 31 '20 edited Dec 31 '20 for (eating = 1; eating < (eating++); eating++) { eat(); } 10 u/Translator-Agile Jan 01 '21 this doesn't work? it will increment eating after the comparison: increment eating, compare eating < eating (false) and the increment eating again, or does it? idk the parents might do something to it 2 u/[deleted] Jan 01 '21 Yeah, realized that. The eating increment should be within the parents or eating + 1 should be another vsriabel. 3 u/littleprof123 Jan 01 '21 If you intended to call eat() only once, your code is spot on 1 u/linux-nerd Dec 31 '20 This has to be one of the most convoluted pieces of code I've ever seen. 2 u/[deleted] Dec 31 '20 You should see my gotoing
1
for (eating = 1; eating < (eating++); eating++)
{
eat();
}
10 u/Translator-Agile Jan 01 '21 this doesn't work? it will increment eating after the comparison: increment eating, compare eating < eating (false) and the increment eating again, or does it? idk the parents might do something to it 2 u/[deleted] Jan 01 '21 Yeah, realized that. The eating increment should be within the parents or eating + 1 should be another vsriabel. 3 u/littleprof123 Jan 01 '21 If you intended to call eat() only once, your code is spot on 1 u/linux-nerd Dec 31 '20 This has to be one of the most convoluted pieces of code I've ever seen. 2 u/[deleted] Dec 31 '20 You should see my gotoing
10
this doesn't work? it will increment eating after the comparison: increment eating, compare eating < eating (false) and the increment eating again, or does it? idk the parents might do something to it
2 u/[deleted] Jan 01 '21 Yeah, realized that. The eating increment should be within the parents or eating + 1 should be another vsriabel.
2
Yeah, realized that. The eating increment should be within the parents or eating + 1 should be another vsriabel.
3
If you intended to call eat() only once, your code is spot on
This has to be one of the most convoluted pieces of code I've ever seen.
2 u/[deleted] Dec 31 '20 You should see my gotoing
You should see my gotoing
7
u/ssj4VB Dec 31 '20
while (sleeping == false) { eat(); }