Page 1 of 1
Can't find the operators
Posted: Mon Sep 21, 2015 7:25 pm
by enric
I missed the bitwise operators I remember the >> worked to shift bit right but not remember the bit And , xOR , xAND etc.
Re: Can't find the operators
Posted: Tue Sep 22, 2015 3:47 pm
by pipfromslitherine
There is a Not() command in the scripting, as well as & and | operators.
Cheers
Pip
Re: Can't find the operators
Posted: Tue Sep 22, 2015 4:18 pm
by enric
But this gives an error
if ( (x & 1) == 1)
{
Log("and 1");
}
Re: Can't find the operators
Posted: Tue Sep 22, 2015 6:12 pm
by pipfromslitherine
I think they can only be used as operators e.g.
x = x & 1
should work (I THINK!)
Cheers
PIp
Re: Can't find the operators
Posted: Tue Sep 22, 2015 6:19 pm
by enric
Yes then it works, need more code (special characteristics of the script system )
y = x & 1
if (y == 1)
{
do the job
}