Cipherd@lemmy.ml to Programmer Humor@programming.dev · 22 hours agofunctionslemmy.mlimagemessage-square83fedilinkarrow-up1494arrow-down17file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1487arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 22 hours agomessage-square83fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squarex00z@lemmy.worldlinkfedilinkEnglisharrow-up2·15 hours agoYeah 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/
minus-squareZiglin (it/they)@lemmy.worldlinkfedilinkEnglisharrow-up1·8 hours agoI’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.
minus-squarex00z@lemmy.worldlinkfedilinkEnglisharrow-up1·5 hours agoWe’ll just put everything in int main(). No worries
Yeah that’s C.
I added the
gototo put emphasis on the function being a label instead of a real function.https://www.geeksforgeeks.org/c/goto-statement-in-c/
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.
We’ll just put everything in
int main(). No worries