Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

Union Übersetzung nach Pascal

  Alt 12. Mär 2007, 15:04
Hi,

Auf Assabards Seite habe ich folgende Übersetzung gefunden


Code:
union {
    struct {
      DWORD Signature;
      DWORD CheckSum;
    } Mbr;
    struct {
      GUID DiskId;
    } Gpt;
  };


Delphi-Quellcode:
case Integer of
    0: (
       Signature: DWORD;
       CheckSum: DWORD
       );
    1: (
       DiskId: TGUID
       );
Ok das ist nachvollziebar... ABER was ist soll das hier bedeuten:

Code:
union {
        PARTITION_INFORMATION_MBR Mbr;
        PARTITION_INFORMATION_GPT Gpt;
    };
?

Delphi-Quellcode:
Case Integer of
 0: PARTITION_INFORMATION_MBR;
 1: PARTITION_INFORMATION_GPT;
end;
... Aber was für einen Sinn ergibt das?

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat