[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A type declaration looks like this:
type type identifier = type definition; ... type identifier = type definition; |
type type identifier = type definition value constant expression; ... type identifier = type definition value constant expression; |
A type declaration part begins with the reserved word type
.
It declares a type identifier which is defined by type definition.
A type definition either can be an array, a record, a schema, a set, an
object, a subrange, an enumerated type, a pointer to another type identifier
or simply another type identifier which is to alias.
If a schema type is to be declared, type identifier is followed by a
discriminant enclosed in parentheses:
type identifier (discriminant) = schema type definition; |
If value
is specified, followed by a constant satisfying
the type definition, every variable of this type is initialized with
constant expression, unless it is initialized by value
itself.
The reserved word value
can be replaced by `=', however
value
is not allowed in ISO-Pascal and Borland Pascal, and the
replacement by `=' is not allowed in Extended Pascal.
type { This side is the } { That side is the } { type declaration } { type definition } |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |