Hello Charles
do you have a macro that can do a similar function as the PB's IsFalse operator ?
please refer to https://forum.powerbasic.com/forum/announcements-articles-and-support-faqs/pbwin-online-help-and-commentary/57595-isfalse-and-istrue-operators (https://forum.powerbasic.com/forum/announcements-articles-and-support-faqs/pbwin-online-help-and-commentary/57595-isfalse-and-istrue-operators)
i tried to replace it with NOT and was not sucessful?
Did you try encapsulating the value?
IF NOT (Statement + Statement) THEN
END IF
You can directly substitute IsFalse with not :)
if not a=b then ...
The use of PB's IsFalse / IsTrue is a waste of time.
Zero is Always FALSE, while any other value is TRUE.
The NOT operator convert ZERO to -1, while NOT -1 = ZERO.
In o2, the conditional not is a boolean rather than a bitwise operator. It inverts the logic of any expression that follows it. The grammar is imperfect but it supports very concise conditionals:
int a
if a
...
endif
if not a
...
endif
translates to:
'if
cmp a,0
jz fwd _end_cnd
...
._end_cnd
'if not
cmp a,0
jnz fwd _end_cnd
...
._end_cnd
Thanxx a lot Charles
It makes more sense to use O2 than the ancient PB