r/ProgrammerDadJokes • • Mar 07 '18

How long does a loop last?

For a while

681 Upvotes

12 comments sorted by

37

u/loki444 Mar 08 '18

Jeez, I read this as, "how long does a poop last?"

Came here to say that it depends on whether you are at work or not.

Sorry about this. I'm going to go for my eye exam soon.

19

u/[deleted] Apr 23 '18

Can't c#?

3

u/359K1RO Jul 16 '18

Until it breaks

0

u/[deleted] Mar 07 '18

[deleted]

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?

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!