$PBExportHeader$uf_bitand.srf
global type uf_bitand from function_object
end type

forward prototypes
global function unsignedlong uf_bitand (unsignedlong al_val1, unsignedlong al_val2)
end prototypes

global function unsignedlong uf_bitand (unsignedlong al_val1, unsignedlong al_val2);
ulong ll_ret
integer li_i


for li_i = 0 to 31

    if mod(long(al_val1 / 2 ^ li_i), 2) + mod(long(al_val2 / 2 ^ li_i), 2) = 2 then
        ll_ret += 2 ^ li_i
    end if

next

return ll_ret

end function

