Cipherd@lemmy.ml to Programmer Humor@programming.dev · 4 days agofunctionslemmy.mlimagemessage-square106linkfedilinkarrow-up11arrow-down10file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up11arrow-down1imagefunctionslemmy.mlCipherd@lemmy.ml to Programmer Humor@programming.dev · 4 days agomessage-square106linkfedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squareZiglin (it/they)@lemmy.worldlinkfedilinkEnglisharrow-up0·4 days agoOr perhaps call function if you’ve got a call stack going. Nevermind that is C or something right? Otherwise it would be jmp function?
minus-squarex00z@lemmy.worldlinkfedilinkEnglisharrow-up0·4 days 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-up0·3 days 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.
function: ... goto function;Or perhaps
call functionif you’ve got a call stack going.Nevermind that is C or something right? Otherwise it would be
jmp function?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.