Well this | is a so called "bitwise" or. If you have a binary number like 0110 and another binary number like 0100 you can use the OR to connect them and "calculate" a resulting number. In this case: 0110 | 0100 = 0110 What you do: You look at each "position" in both number strings and if one of them 1 you write a 1 to the result: 0 | 0 = 0 0 | 1 = 1 1 | 1 = 1 0 | 0 = 0 result = 0110
The |= operatator does the same but also includes an assignment to another variable. a |= b is the same as: a = a | b
Hope this makes some sense to you.
Re: What's the meaning of this |=?
[Re: Xarthor]
#319087 04/12/1009:2004/12/1009:20
In Lite-C there is an operator to make decision about equality. In this language, as like as all "C" like languages, this operator is the "==". Sometime in programming we need to examine the reversed equality for this purpose is being the "|=". So just imagine
1. == equal
2. |= not equal
3. >= greater than
4. <= less than
and so on...
Re: What's the meaning of this |=?
[Re: Aku_Aku]
#319193 04/12/1020:3004/12/1020:30