Original Author Paul Laughton, 2011
Page 56
De Re BASIC!
a += 1
is the same as
a = a + 1
a$ += "xyz"
is the same as
a$ = a$ + "xyz"
b /= 5 + 3
is the same as
b = b / (5 + 3)
c ^= log(37) + 1
is the same as
c = c ^ (log(37) + 1)
d *= --d + d--
is the same as
d = d * (--d + d--)
m &= (x$ = y$) | (x$ != z$) is the same as m = m & ((x$ = y$) | (x$ != z$))
Math Functions
Math functions act like numeric variables in a <nexp> (or <lexp>).
BOR(<nexp1>, <nexp2>)
Returns the logical bitwise value of <nexp1> OR <nexp2>. The double-precision floating-point values are
converted to 64-bit integers before the operation.
BOR(1,2) is 3
BAND(<nexp1>, <nexp2>)
Returns the logical bitwise value of <nexp1> AND <nexp2>. The double-precision floating-point values
are converted to 64-bit integers before the operation.
BAND(3,1) is 1
BXOR(<nexp1>, <nexp2>)
Returns the logical bitwise value of <nexp1> XOR <nexp2>. The double-precision floating-point values
are converted to 64-bit integers before the operation.
BXOR(7,1) is 6
BNOT(<nexp>)
Returns the bitwise complement value of <nexp>. The double-precision floating-point value is converted
to a 64-bit integer before the operation.
BNOT(7) is -8
HEX$(BNOT(HEX("1234"))) is ffffffffffffedcb
ABS(<nexp>)
Returns the absolute value of <nexp>.
SGN(<nexp>)
Returns the signum function of the numerical value of <nexp>, representing its sign.
When the value is:
Return:
> 0
1