title: How are the basic Delphi types related to each other?
body: <p>Delphi has long supported a few basic numeric types and I was wondering how they are related to each other.</p>
  
  <p>In Delphi 2007 I found these declarations (some are conflicting, some are mere aliasses) :</p>
  
  <p>Types.pas:</p>
  
  <pre><code>DWORD = LongWord;
  Largeint = Int64;
  </code></pre>
  
  <p>getmem.inc:</p>
  
  <pre><code>DWORD = Integer;
  </code></pre>
  
  <p>Windows.pas:</p>
  
  <pre><code>DWORD = Types.DWORD;
  SHORT = Smallint;
  UINT = LongWord;
  ULONG = Cardinal;
  LONGLONG = Int64;
  TLargeInteger = Int64;
  ULONGLONG = UInt64;
  </code></pre>
  
  <p>This leads me into thinking the base signed numeric types are SmallInt, Integer and Int64. Unsigned, there's Byte, WORD and UInt64. But what is the difference between Cardinal and LongWord? (By the way, what's the original and intended casing for these types?)</p>
  
  <p>And is there a type for signed 8 bit integers (Int8)?</p>
  
  <pre><code>// Int8 = ?unknown?;
  UInt8 = Byte;
  Int16 = SmallInt;
  UInt16 = Word;
  Int32 = Integer;
  UInt32 = LongWord;
  // Int64 already exists
  // UInt64 already exists
  </code></pre>
  
  <p>Lastly, how should I define Int and UInt, especially with regard to C/C++ compatibility and a future switch to other platforms (possibly also 64 bit)? (A related question is, of course, how will the various numeric types be defined in 64-bit Delphi?)</p>