函数问题
帮我解释一下这段函数的意思
function IsBitOn (Value: Integer; Bit: Byte): Boolean;
begin
Result := (Value and (1 shl Bit)) <> 0;
end;
[解决办法]
测试Value这个Integer整数的第Bit位是否是1
发布时间: 2012-02-14 19:19:19 作者: rapoo
函数问题
帮我解释一下这段函数的意思
function IsBitOn (Value: Integer; Bit: Byte): Boolean;
begin
Result := (Value and (1 shl Bit)) <> 0;
end;
[解决办法]
测试Value这个Integer整数的第Bit位是否是1