tatterdemalion@programming.dev to Science Memes@mander.xyzEnglish · 2 years agoif statement == falsei.imgflip.comimagemessage-square14linkfedilinkarrow-up1213arrow-down115
arrow-up1198arrow-down1imageif statement == falsei.imgflip.comtatterdemalion@programming.dev to Science Memes@mander.xyzEnglish · 2 years agomessage-square14linkfedilink
minus-squareSteve Dice@sh.itjust.workslinkfedilinkEnglisharrow-up8arrow-down5·2 years agoNo, they’re not. Let’s assume they are. Let funky function be defined as: int funky() { a=0 b=1 if ( a==1 ) { b=1 } return(a) } Since a==1 if, and only if, b=1, in particular a==1 if b=1. We have b=1, therefore a==1. It follows funky will always return 1 but… it doesn’t. QED.
minus-squareSteve Dice@sh.itjust.workslinkfedilinkEnglisharrow-up1·2 years agoI agree but it’s also what the original meme is doing. I thought we were all shitposting here.
No, they’re not.
Let’s assume they are. Let funky function be defined as:
int funky() { a=0 b=1 if ( a==1 ) { b=1 } return(a) }Since a==1 if, and only if, b=1, in particular a==1 if b=1. We have b=1, therefore a==1. It follows funky will always return 1 but… it doesn’t. QED.
deleted by creator
I agree but it’s also what the original meme is doing. I thought we were all shitposting here.
deleted by creator