Jason Novinger@programming.devM to Python@programming.dev · edit-21 year ago[Meme] Swapping integers in Pythonlemmy.worldimagemessage-square16fedilinkarrow-up141arrow-down14file-textcross-posted to: bumba@boomer.casinoprogrammerhumor@lemmy.ml
arrow-up137arrow-down1image[Meme] Swapping integers in Pythonlemmy.worldJason Novinger@programming.devM to Python@programming.dev · edit-21 year agomessage-square16fedilinkfile-textcross-posted to: bumba@boomer.casinoprogrammerhumor@lemmy.ml
minus-squareActuallyRuben@actuallyruben.nllinkfedilinkarrow-up2·1 year agoCouldn’t have explained it better myself. I don’t remember where exactly I first read about this trick, but it’s mainly useful in C or Assembly, as you don’t have to resort to using a third variable/register.
Couldn’t have explained it better myself. I don’t remember where exactly I first read about this trick, but it’s mainly useful in C or Assembly, as you don’t have to resort to using a third variable/register.