关于超想
本站导航
邮件列表
  首页 | 本站产品 | Delphi资料 | 免费资源 | 程序人生 | 软件工程 | 网站设计 | 推荐网站
你所在的位置 -> 主页 -> 超想软件 -> 编程资料 -> delphi -> 开发技巧 -> 数值算法 ->详细
相关内容  
 
 
 
【新品推荐】

  详细内容
 

一些位操作的函数
作者: 评价: 上站日期: 2001-05-06
内容说明:
来源:

function IsBitSet(const val:longint; const TheBit:byte): boolean;
begin
  Result := (val and (1 shl TheBit)) < >  0;
end;

function BitOn(const val: longint; const TheBit: byte): LongInt;
begin
  Result := val or (1 shl TheBit);
end;

function BitOff(const val: longint; const TheBit: byte): LongInt;
begin
  Result := val and ((1 shl TheBit) xor $FFFFFFFF);
end;

function BitToggle(const val:longint;const TheBit:byte): LongInt;
begin
  Result := val xor (1 shl TheBit);
end;

 
你所在的位置 -> 主页 -> 超想软件 -> 编程资料 -> delphi -> 开发技巧 -> 数值算法 ->详细
  首页 | 本站产品 | Delphi资料 | 免费资源 | 程序人生 | 软件工程 | 网站设计 | 推荐网站
声明:本站内容除注明原创以外均从网上摘抄,如有侵权请指明。
  如果您对我们的网站有什么意见或者建议,请与我们联系
powered by 建站易上手- V2.0