[fpc-pascal] Function to set high and low Dword of a QWord
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Feb 28 18:21:34 CET 2007
On 28 feb 2007, at 18:06, Florian Klaempfl wrote:
> Jonas Maebe schrieb:
>>
>> function makeqword(d1, d2: dword): qword;
>> begin
>> result:=(qword(d2) shl 32) or d1;
>> end;
>
> Cleaner imo:
>
> lo(result):=d1;
> hi(result):=d2;
I think this is a lot less clean (if only because lo/hi have
different meanings in FPC and Delphi, making it less clear what the
code does). Besides, lo()/hi() do not produce lvalues, so it doesn't
even compile :)
Jonas
More information about the fpc-pascal
mailing list