How to translate |= operator from JavaScript to Delphi ?

Today I faced an operator that I don't know what means in JavaScript, |= . Google doesn't help too much when you try to look for this "strange" characters. Someone knows what it means ? And How I convert it to Delphi ?





a |= b;

It is equal to this

a = a | b;

The operator | is called the bitwise OR operator and it

Returns a one in each bit position for which the corresponding bits of either or both operands are ones.

For further information regarding the bitwise operators in JavaScript, please have a look at Mozilla's JavaScript reference.

According to the Delphi documentation, I think that you are looking for the or operator:

a := a Or b;

It is bitwise or. In Delphi,

a := a or b;


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.