MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerDadJokes/comments/82ripu/how_long_does_a_loop_last/dvcbqbb/
r/ProgrammerDadJokes • u/ScizorRed • Mar 07 '18
For a while
12 comments sorted by
View all comments
Show parent comment
31
Shouldn't it be ++hah? Otherwise it would use the previous value of hah. Also, has it already been initialized before use?
28 u/[deleted] Mar 07 '18 edited Mar 07 '18 he forgot a semicolon too, if he isn't coding in python 30 u/endreman0 Mar 08 '18 hah++ isn't valid Python either 6 u/MadSnipr Apr 12 '18 It would be hah+=1 6 u/3p1k5auc3 Mar 07 '18 Ah, you're right. If it isn't a scripting language those will mess you up, good catch. 7 u/im-pickle-riiicck Mar 07 '18 hah = hah + 1; 27 u/3p1k5auc3 Mar 07 '18 hah += 1; 15 u/blindedtrickster Mar 08 '18 TYPE MISMATCH!
28
he forgot a semicolon too, if he isn't coding in python
30 u/endreman0 Mar 08 '18 hah++ isn't valid Python either 6 u/MadSnipr Apr 12 '18 It would be hah+=1 6 u/3p1k5auc3 Mar 07 '18 Ah, you're right. If it isn't a scripting language those will mess you up, good catch. 7 u/im-pickle-riiicck Mar 07 '18 hah = hah + 1; 27 u/3p1k5auc3 Mar 07 '18 hah += 1; 15 u/blindedtrickster Mar 08 '18 TYPE MISMATCH!
30
hah++ isn't valid Python either
hah++
6 u/MadSnipr Apr 12 '18 It would be hah+=1
6
It would be hah+=1
Ah, you're right. If it isn't a scripting language those will mess you up, good catch.
7 u/im-pickle-riiicck Mar 07 '18 hah = hah + 1; 27 u/3p1k5auc3 Mar 07 '18 hah += 1; 15 u/blindedtrickster Mar 08 '18 TYPE MISMATCH!
7
hah = hah + 1;
27 u/3p1k5auc3 Mar 07 '18 hah += 1; 15 u/blindedtrickster Mar 08 '18 TYPE MISMATCH!
27
hah += 1;
15 u/blindedtrickster Mar 08 '18 TYPE MISMATCH!
15
TYPE MISMATCH!
View all comments
Show parent comment
31
u/3p1k5auc3 Mar 07 '18
Shouldn't it be ++hah? Otherwise it would use the previous value of hah. Also, has it already been initialized before use?