1 страниц (7 вхождений)
Multiple Binary Boolean Operators in if statement - Add multiple binary Boolean "or" / "and" operators without force parenthesis - Сообщения
#1 Опубликовано: 3 года назад
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 Опубликовано: 3 года назад
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 КиБ) скачан 125 раз(а).
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 КиБ) скачан 125 раз(а).
Best regards.
Alvaro.
#3 Опубликовано: 3 года назад
#4 Опубликовано: 3 года назад
WroteThink in term of productive Bolean.
... lot more involved. Adapted from Frank Rioux MCD 11.
Fourier Quantum 2C Mask.sm (22 КиБ) скачан 119 раз(а).
#6 Опубликовано: 3 года назад
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 КиБ) скачан 130 раз(а).
1 пользователям понравился этот пост
sergio 3 года назад
#7 Опубликовано: 3 года назад
1 страниц (7 вхождений)
-
Новые сообщения
-
Нет новых сообщений