Contents Up << >>
Alias declarations
An alias can be used to assign a name to an already declared object.
This can be used as a shortcut or to reference part of an object as
if it was a whole object. The syntax for the alias declaration is:
The simple name will be an alias for name. The subtype specifies
the type of the object denoted by the alias. Any time the alias is
referenced it is equivalent to substituting that reference for the name part.
A typical example of how an alias might be used is to alias different fields
represented by a vector. For example, an instruction code of a processor
contains different fields, but they are stored together in one vector.
The following example shows how an alias can be used to distinguish the
fields of an IEEE floating point number stored in a vector.