Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1683

Difference Between IF and IFF

$
0
0
I expected that the IF and IFF commands would properly interpret the values 0 and 1 to be FALSE and TRUE, respectively. When I tested it with IFF, it worked.

TCC(30.00.18): C:\>iff 0 then echo TRUE & else & echo FALSE & endiff
FALSE

TCC(30.00.18): C:\>iff 1 then echo TRUE & else & echo FALSE & endiff
TRUE

So I could not understand why my code that used IF was failing with error messages -- until I tried the same simple cases.

TCC(30.00.18): C:\>if 0 echo FALSE
Usage : IF [/I]...

Read more

Viewing all articles
Browse latest Browse all 1683

Trending Articles