Simple IF statement not working. Not sure what I am doing wrong. I want to print 32 if the negation of 64 is false and 64 otherwise
If[!($SystemWordLength = 64),32, 64]
Simple IF statement not working. Not sure what I am doing wrong. I want to print 32 if the negation of 64 is false and 64 otherwise
If[!($SystemWordLength = 64),32, 64]
Does it work with Equal (==) instead of Set (=)?
yes It works!! Thanks.. I still confuse her and then when use the SET == and the Equal = is applied. Thanks very much! Also.. Can you comment what is best practice
If[! $SystemWordLength == 64, 32, 64]
(*or*)
If[! ($SystemWordLength == 64), 32, 64]
(*or*)
If[(! $SystemWordLength == 64), 32, 64]
That’s enough
If[$SystemWordLength != 64, 32, 64]
I believe that on all platforms supported today, just using
$SystemWordLength
will return the same number as the If statement, so that may suffice.