Hi, > But what will fScanMode show? > > int fScanMode |= 2; > > Taken from this > > fScanMode = 0; > > if (fDiscoverable->Value()) { > fScanMode = 1; > fVisible->SetEnabled(true); > } else { > fVisible->SetValue(false); > fVisible->SetEnabled(false); > } > > if (fVisible->Value()) > fScanMode |= 2; Imagine fScanMode is worth 1, in binary that would be 00000001, that operator is equivalent to fScanMode = fScanMode | 2. Now 2 is 00000010, so the operation will give that fScanMode == 00000011. Is that answering your question? :) In essence, it is setting the second bit in 'less significant order' to 1. -- Philippe