Since this the bitwise operation for AND. It is pretty simple to write your own function that takes two parameters compares them and returns the result.
0 1 0 1 0 1 1 0
0 0 1 1 0 0 1 0
0 0 0 1 0 0 1 0
Ahmed Rashed Amini
Independent Consultant/Developer
The example is too complicated/. There is simple function:
BitAnd(A : Integer;B : Integer) : Integer
Var
Pos : integer;
Tmp : integer;
begin
Pos :=1;
Tmp := 0;
FOR i:=1 TO 32 DO BEGIN //count of bits in integer
IF ((A MOD 2) =1) AND ((B MOD 2)=1) THEN
Tmp := Tmp + Pos;
Pos := Pos * 2;
A := A DIV 2;
B := B DIV 2;
END;
EXIT(Tmp);
end;
BitOr(A : Integer;B : Integer) : Integer
Var
Pos : integer;
Tmp : integer;
begin
Pos :=1;
Tmp := 0;
FOR i:=1 TO 32 DO BEGIN //count of bits in integer
IF ((A MOD 2) =1) OR ((B MOD 2)=1) THEN
Tmp := Tmp + Pos;
Pos := Pos * 2;
A := A DIV 2;
B := B DIV 2;
END;
EXIT(Tmp);
end;
Comments
0 1 0 1 0 1 1 0
0 0 1 1 0 0 1 0
0 0 0 1 0 0 1 0
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
http://www.mbsonline.org/forum/topic.asp?TOPIC_ID=4162
If you want a faster approach, make a DLL and call it from within Navision.
http://www.autocloseidle.com
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.