Comment on if statement == false

stevedice@sh.itjust.works ⁨2⁩ ⁨weeks⁩ ago

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.

source
Sort:hotnewtop