如何在Delphi中通过位运算将Int64拆分为两个整数?
我的解决方案
最初我写的代码是这样的:
IntLo := Integer(Value and $FFFFFFFF); IntHi := Integer((Value shr 32) and $FFFFFFFF);
但我不确定这是不是性能最优的实现方式。
*编辑:
后来我意识到完全不需要做按位与操作,简化后的代码如下:
IntLo := Integer(Value); IntHi := Integer(Value shr 32);
内容的提问来源于stack exchange,提问作者Wolf Country
相关产品推荐
相关产品推荐

