Login
Products
Sales
Support
Downloads
About
Home
»
Technical Support
»
Elevate Web Builder Technical Support
»
Support Forums
»
Elevate Web Builder General
»
View Thread
View Thread
The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Bitwise operators
Sun, Jul 31 2016 1:00 PM
Permanent Link
thomh
Hi,
I need to turn bits on/off and check if bit is set on an integer. Is this possible in EWB?
// Thom
Sun, Jul 31 2016 1:40 PM
Permanent Link
thomh
Never mind, found them.
// Thom
Sun, Jul 31 2016 1:44 PM
Permanent Link
Bruno Larochelle
i've done this a few years ago, in Delphi
here is a 'readBit' function that works in EWB. similar technique to get a 'writeBit' function working
there are probably better ways of doing it, but it worked for me
//////////////
function Tform1.readBit(intValue: integer; intBit: integer): boolean;
begin
result := intValue AND round(power(2,intBit));
end;
//////////////
thomh wrote:
Hi,
I need to turn bits on/off and check if bit is set on an integer. Is this possible in EWB?
// Thom
Bruno Larochelle
Logiciels Bitwise Software
Edmonton, AB, Canada