Message Boards Message Boards

0
|
4445 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Simple IF statement with `$SystemWordLength` not working

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]
POSTED BY: Jose Calderon
4 Replies

I believe that on all platforms supported today, just using

$SystemWordLength

will return the same number as the If statement, so that may suffice.

POSTED BY: Ilian Gachevski

That's enough

 If[$SystemWordLength != 64, 32, 64]
POSTED BY: Udo Krause

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]
POSTED BY: Jose Calderon

Does it work with Equal (==) instead of Set (=)?

POSTED BY: Ilian Gachevski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract