Re: bitwise operation doesn't work, what am I doing wrong?




"Jamie" <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx> wrote in message
news:tmYkh.263$c46.246@xxxxxxxxxxxxxxx
Just do this.
If (Alignment and DT_LEFT) = DT_LEFT then.....
that will mask out all other bits leaving behind only
the one you're looking for.
if it happens to be a zero value, that's fine, it will
still work this way because comparing 0 with 0 will = true.

If alignment = DT_LEFT (* nothing set *) then
else

x and 0 = 0 will always be true
eqivalanence not mask


.



Relevant Pages

  • Re: JLA #13 question
    ... "Old School" (written with a modern sensibility) is fine, but leaving ... in the first place, why the mask was left on, and, frankly, why he was ...
    (rec.arts.comics.dc.universe)
  • Re: So thats why the Iron Sheik hates B. Brian Blair, huh?
    ... with two sons", but here ... the face with a closed fist, leaving a red mark and swelling, the ... hopes he uses the "it was actually Jim Brunzell under the mask at the ...
    (rec.sport.pro-wrestling)
  • Re: PCB Sensitivity to UV exposure?
    ... The etch *mask* is UV sensitive. ... After etching, the remaining mask is ... cleaned off, leaving just copper. ... Copper is not UV sensitive. ...
    (sci.electronics.basics)
  • Re: [PATCH] Avoid truncating to long in ALIGN() macro
    ... unsigned long addr; ... unsigned int alignment; ... when alignment is just an int, this creates an int mask. ...
    (Linux-Kernel)
  • Re: [S] Re: [linux-uwb] packet size problem
    ... whose lenth is 3584 when the request_queue's dma_alignment mask is set ... dma_alignment mask is the buffer address alignment, ...
    (Linux-Kernel)