this post was submitted on 22 Nov 2025
651 points (98.7% liked)

Programmer Humor

27673 readers
939 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

cross-posted from: https://lemmy.ml/post/39334581

you are viewing a single comment's thread
view the rest of the comments
[–] x00z@lemmy.world 6 points 1 week ago (1 children)
function:
...
goto function;
[–] Ziglin@lemmy.world 2 points 1 week ago (1 children)

Or perhaps call function if you've got a call stack going.

Nevermind that is C or something right? Otherwise it would be jmp function?

[–] x00z@lemmy.world 2 points 1 week ago (1 children)

Yeah that's C.

I added the goto to put emphasis on the function being a label instead of a real function.

https://www.geeksforgeeks.org/c/goto-statement-in-c/

[–] Ziglin@lemmy.world 1 points 1 week ago (1 children)

I've done that in C before. I was just confused because the labels need to be in scope of a function as far as I am aware. In assembly you don't really have that.

[–] x00z@lemmy.world 1 points 1 week ago

We'll just put everything in int main(). No worries