Einzelnen Beitrag anzeigen

kolbaschedder

Registriert seit: 24. Aug 2006
Ort: Schwäbisch Gmünd
55 Beiträge
 
Delphi 2006 Professional
 
#4

Re: [Ansi C] Long in Bytes aufteilen

  Alt 9. Okt 2007, 17:24
Hallo,

einen eigenen Typen anlegen.

Delphi-Quellcode:
type
  MyTyp = packed record
  case a:byte of
    1 : (dw : DWord;);
    2 : (b1,b2,b3,b4 : byte;);
  end;

var test : MyTyp;

begin
  test.dw := 23420784;
  int1 := test.b1;

//usw
  Mit Zitat antworten Zitat