Home AMX User Forum NetLinx Studio

BITWISE Question

hi together

i trying to change a code example for C++ into AMX-Code....
in a function is see the following operators in C++:

& i found this muste be BAND
but i don't find anything about this:

&= (BAND and ADD ???)

how can i etablish it in AMX?

thanks for any help
john

Comments

  • Jorde_VJorde_V Posts: 393
    Afaik there is not bitwise and assign operator in the Netlinx language. You'll have to do it manually.
  • Nerieru wrote: »
    Afaik there is not bitwise and assign operator in the Netlinx language. You'll have to do it manually.

    OK, thanks

    john
  • jweatherjweather Posts: 320
    Specifically, "x &= 0x42" in C++ would become "x = x BAND $42" in NetLinx.
  • jweather wrote: »
    Specifically, "x &= 0x42" in C++ would become "x = x BAND $42" in NetLinx.

    thanks for the hint!

    john
  • PhreaKPhreaK Posts: 966
    There are no compound assignment operators in NetLinx, so unfortunately all of that guff has to be done the long handed way.

    Bitwise operators can either use the pseudo english (e.g. 'BAND', BXOR', etc) or operator characters common to the C family languages (e.g. '&', '^', etc).
Sign In or Register to comment.