Цитата Сообщение от NEO SPECTRUMAN Посмотреть сообщение
не знаю как у вас
у нас когда люди говорят

если (if)
A не равно 1
или (or)
A не равно 5
тогда (then)
Ы = 7
если нет (else)
тогда Ы = 0
yeah, we say "if not equal to 1 and not equal to 5". I guess some people could use "or" there, but they are just using the language wrong, or not understanding the logic expressions. (mind you, while I didn't finish my university studies, I made it far enough to have all exams from math basics, like logic evaluation, so for me it's easy to use the language correctly in logic constructs ... but from my experience with people who didn't study it, it's common they don't understand the rules correctly, and say the wrong thing, while they think something else - very common by non-math people, it's not easy to formulate the rule correctly in human language, even by intelligent people, if they are missing the formal math teaching).

But I think your example is actually correct if read in certain way, like this: "if A not equal to (1 or 5), then B = 7, else B = 0" -> now this makes some sense also from math point of view, a bit like incomplete distribution of negation, so you end with something like "IF A != (1 || 5)", but if you expand it to simpler statements, it needs the || negation, so "IF A != 1 && A != 5"

Any way, you can in sjasmplus source always try to pick the "simpler to read", so if you are more familiar with "1 or 5", then do the positive form and negate the final result, like this:
Код:
  IF !(A == 1 || A == 5 || A == 7)
    ;; other values of A (not 1 or 5 or 7)
  ELSE
    ;; when A is 1 or 5 or 7
  ENDIF
  ;; notice the "!" at beginning of the expression
  ;; flipping the final result of the test