r/ProgrammerHumor • • 4d ago

Meme technicallyCorrect

Post image
1.6k Upvotes

50 comments sorted by

View all comments

27

u/Pure_Material_9235 4d ago

Does this ensure that it only prints it one time? It seems like this would print it many times. Does that @ symbol make it only print once?

Oh, nevermind, it's j = 0, i = 0, and both less than 1.

8

u/DarthPiotr 4d ago

The @ symbol in C# means that you don't have to escape special characters inside, including new lines. This is why you can have a string spanning a few lines without syntax error.

7

u/laplongejr 4d ago

I need a name for that... a startingblock loop?   "Ready to run but will only go once"  

-16

u/DJDevon3 4d ago

With i++ 😂 I've never seen trollish coding before but if it exists this is it.

5

u/2eanimation 4d ago

i = 0
x = ++i
x == 1 -> true

vs

i = 0
x = i++
x == 0 -> true

0

u/[deleted] 3d ago

[deleted] — view deleted comment

1

u/2eanimation 3d ago

I don’t know what your point here is, but what is x? x++ == 0 -> true only holds if x was 0. You haven’t defined x tho.