Tony

Try this way ...

program Project1;

uses
     Windows,
     Dialogs,
     SysUtils;

{$R *.RES}

var
     P              : PWord;
     A              : array[0..10] of byte;

begin
     A[4] := $01;
     A[3] := $40;
     P := @A[3];
     ShowMessage(IntToStr(P^));

// Might need to do this if byte order is reversed

     ShowMessage(IntToStr(Swap(P^)));
end.

Paul Lowman

Lowman Consulting Ltd.
Embedded Systems & Software


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to