1 Pages (7 items)
Multiple Binary Boolean Operators in if statement - Add multiple binary Boolean "or" / "and" operators without force parenthesis - Messages
#1 Posted: 5/6/2022 10:53:10 PM
When I try to perform this if-or statement:
if a=1 ^ a=2 ^ a=3
x=4
else x =5
I end up with this due to forced parenthesis:
if ((a=1 ^ a=2) ^ a=3)
x=4
else x =5
Could we have capability for multiple binary operators without forced parenthesis enclosure?
if a=1 ^ a=2 ^ a=3
x=4
else x =5
I end up with this due to forced parenthesis:
if ((a=1 ^ a=2) ^ a=3)
x=4
else x =5
Could we have capability for multiple binary operators without forced parenthesis enclosure?
#2 Posted: 5/7/2022 12:27:03 AM
Hi. The short and honest answer is not. The long and tricky answer is that you can, but you must edit the .sm file and delete the lines with (
However, unless it's for some publishing purpose or something like that, I don't think it's convenient. Also, you can neither copy nor edit it without the parentheses reappearing.

and_tryck.sm (2 KiB) downloaded 62 time(s).
Best regards.
Alvaro.
However, unless it's for some publishing purpose or something like that, I don't think it's convenient. Also, you can neither copy nor edit it without the parentheses reappearing.
and_tryck.sm (2 KiB) downloaded 62 time(s).
Best regards.
Alvaro.
#3 Posted: 5/7/2022 8:59:32 AM
#4 Posted: 5/9/2022 8:01:56 AM
WroteThink in term of productive Bolean.
... lot more involved. Adapted from Frank Rioux MCD 11.
Fourier Quantum 2C Mask.sm (22 KiB) downloaded 57 time(s).
#6 Posted: 5/9/2022 10:06:38 AM
WroteYou can always create some function to make it look like you are working with some set of numbers
Tanks Davide ... coded/saved.
Take care ... Jean.
Maths Conditional Davide.sm (12 KiB) downloaded 70 time(s).
1 users liked this post
sergio 5/9/2022 12:46:00 PM
#7 Posted: 5/9/2022 11:25:27 AM
1 Pages (7 items)
-
New Posts
-
No New Posts