Quick start manual
5-2
Delphi Language Guide
About types
portability. However, changes in storage format from one implementation of a
generic type to the next could cause compatibility problems—for example, if you
are streaming content to a file as raw, binary data, without type and versioning
information.
• Types can be classified as simple, string, structured, pointer, procedural, or variant. In
addition, type identifiers themselves can be regarded as belonging to a special
“type” because they can be passed as parameters to certain functions (such as
High, Low, and SizeOf).
The outline below shows the taxonomy of Delphi data types.
simple
ordinal
integer
character
Boolean
enumerated
subrange
real
string
structured
set
array
record
file
class
class reference
interface
pointer
procedural
variant
type identifier
The standard function SizeOf operates on all variables and type identifiers. It returns
an integer representing the amount of memory (in bytes) required to store data of the
specified type. For example, SizeOf(Longint) returns 4, since a Longint variable uses
four bytes of memory.
Type declarations are illustrated in the sections that follow. For general information
about type declarations, see “Declaring types” on page 5-39.