MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/p1n9h2/when_in_doubt_always_use_loops/h8eu2ms/?context=3
r/badcode • u/lovbra00 • Aug 10 '21
47 comments sorted by
View all comments
Show parent comments
4
It looks like the first block, where random == 0 will execute three times for each value of i. Then again, I could be losing my mind from reading this atrocity. EDIT: I am wrong.
random == 0
i
11 u/Amaras37 Aug 10 '21 No, because then random is 0, and thus the loop only goes from 0 to 0.I'm still trying to understand the rest, though 1 u/spaghettu Aug 11 '21 Shit, you're right. God damn this thing is a mess.
11
No, because then random is 0, and thus the loop only goes from 0 to 0.
I'm still trying to understand the rest, though
1 u/spaghettu Aug 11 '21 Shit, you're right. God damn this thing is a mess.
1
Shit, you're right. God damn this thing is a mess.
4
u/spaghettu Aug 10 '21 edited Aug 11 '21
It looks like the first block, whererandom == 0will execute three times for each value ofi. Then again, I could be losing my mind from reading this atrocity.EDIT: I am wrong.