this post was submitted on 02 Nov 2023
1407 points (98.6% liked)

Programmer Humor

32396 readers
699 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 14 points 1 year ago (6 children)

turned out to be a semicolon

[–] [email protected] 25 points 1 year ago (2 children)

The tests wouldn't even run of that was the issue, pretty sure (depends on the language I suppose)

[–] [email protected] 16 points 1 year ago (1 children)

fun situations can arise when you write , instead of ; For those not in the know, in c++ the comma operator evaluates the left expression, discards the value, then evaluates the right expression and returns the value. if you now have a a situation like this

int i = 0,
printf("some message");

i has a completely different value, since it actually uses the return value of printf instead

[–] [email protected] 5 points 1 year ago

And people give Python shit for significant whitespace 😂

load more comments (3 replies)