Message board for the users of flat assembler.
> Compiler Internals > fasm if cycle syntax
if ~1 eq 0
display "ok! - BITWISE",0xA
if ~1 eq
display "ok! - NULL",0xA
if 0 eq ~1
display "ok! - ZERO",0xA
I think last display directive don't show cause cycle don't read ~ character.
Is there another way to adapt it?
Is there a way to make more complex if?
if (%>=33 & %<=126) | (%>=200 & %<=500)
|22 Aug 2019, 15:56||
This is in fact one of the reasons why in fasmg EQ operator no longer does compare token sequences (it has to be done with MATCH instead) but only values of valid sub-expressions. The way EQ works in fasm 1 is a bit problematic on boundaries. In your first two samples "~" character is a negation of logical condition "1 eq 0" or "1 eq", while in the third sample "~" is just a part of the compared token sequences - it compares "0" with "~1".
As for the second question, yes - you can create complex conditions with help of logical operators.
|22 Aug 2019, 21:27||
< Last Thread | Next Thread >
Copyright © 1999-2019, Tomasz Grysztar.
Powered by rwasa.