From:                   L D Blake <[EMAIL PROTECTED]>
Organization:           Secret society to end secret societies
To:                     Marco van de Voort <[EMAIL PROTECTED]>
Subject:                Re: [fpc-pascal]About order of units...
Send reply to:          [EMAIL PROTECTED]
Date sent:              Sat, 30 Aug 2003 15:29:48 -0400

> From base.inc ...
> 
>   { was #define dname(params) def_expr }
>   { argument types are unknown }
>   function HIBYTE(w : longint) : BYTE;
> 
> Should be  hibyte(w : word) : byte;  according to the SDK.
> 
> 
>   { was #define dname(params) def_expr }
>   { argument types are unknown }
>   function HIWORD(l : longint) : WORD;
> 
> Should be hiword(l : longword) : word;
.
.

If you have a look at the implementation, you'll quickly find, that 
all of the examples you listed in this mail make absolutely _no_ 
difference. For example:
----------
  function HIBYTE(w : longint) : BYTE;
    begin
       HIBYTE:=BYTE(((WORD(w)) shr 8) and $FF);
    end;
---------
The first thing being done with the supplied argument is type casting 
to a word. BTW, at least some of these macros could probably be 
implemented more efficiently using some pointer arithmetics, but 
that's a different story.

Tomas


_______________________________________________
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to