A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: |=

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    64

    |=

    Can someone explain what the |= operator does or link me to a page with a description?

    Thanks!

  2. #2
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    Well you know that += and -= are of the form:

    x += y;
    x = x + y;

    Same deal:

    x |= y;
    x = x | y;

    The | operator is the bitwise or:
    0 | 0 = 0;
    1 | 0 = 1;
    0 | 1 = 1;
    1 | 1 = 1;

    0101 | 0111 = 0111;
    0100 | 1100 = 1100;

    Etc... There are many tutorials on bitwise operators.
    The greatest pleasure in life is doing what people say you cannot do.
    - Walter Bagehot
    The height of cleverness is to be able to conceal it.
    - Francois de La Rochefoucauld

  3. #3
    Member
    Join Date
    Jun 2007
    Posts
    64
    Ahh, gotcha.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center