結構體
共用體
procedure TForm
type
TRGB = packed record //結構體
R: Byte;
G: Byte;
B: Byte;
A: Byte;
end;
var
rgbPack: TRGB;
rgbData: Integer absolute rgbPack; //共享內存單元
begin
rgbData := $AA
ShowMessage(IntToStr(rgbPack
end;
位域就沒轍了
From:http://tw.wingwit.com/Article/program/Delphi/201311/24855.html