According to Sofistik manual pp9-9
& | Bitwise logical operation on the integer part with AND or OR
| +PROG | Template |
|---|---|
| LOOP#i | 3 |
| IF | #i==0 |
| LET#List(#i) | -1 |
| ELSEIF | #i==2 |
| LET#List(#i) | -1 |
| ELSE | |
| LET#List(#i) | 1 |
| ENDIF | |
| ENDLOOP | |
| PRT#List | |
| end |
The result is -1,1,-1, which is I expected.
But if I use
+PROG Template urs:1
LOOP#i 3
IF (#i==0|#i==2)
LET#List(#i) -1
ELSE
LET#List(#i) 1
ENDIF
ENDLOOP
PRT#List
end
The result is 1,1,1, which is not I expected.
How to use “|” in “IF” condition?