access
subtype_indication
null
which has a null access value designating no object at all. The null value of an access type is the default initial value of the type. Other values of an access type are obtained by evaluation of a special operation of the type called an allocator. Each such access value designates an object of the subtype defined by the subtype indication of the access type definition; this subtype is called the designated subtype; the base type of this subtype is called the designated type. The objects designated by the values of an access type form a collection implicitly associated with the type.
type
FRAME is access
MATRIX; -- see 3.6
type
BUFFER_NAME is access
BUFFER -- see 3.7.1
type
identifier [discriminant_part];
type
CELL; -- incomplete type declaration
type
LINK is access
CELL;
type
CELL is
record
VALUE : INTEGER;
SUCC : LINK;
PRED : LINK;
end record
;
new
CELL'(O, null
, null
);
NEXT : LINK := HEAD.SUCC;
type
PERSON(SEX : GENDER); -- incomplete type declaration
type
CAR; -- incomplete type declaration
type
PERSON_NAME is access
PERSON;
type
CAR_NAME is access
CAR;
type
CAR is
record
NUMBER : INTEGER;
OWNER :PERSON_NAME;
end record
;
type
PERSON(SEX : GENDER) is
record
NAME : STRING(1 .. 20);
BIRTH : DATE;
AGE : INTEGER range
0 .. 130;
VEHICLE : CAR_NAME;
case
SEX is
when
M => WIFE : PERSON_NAME(SEX => F);
when
F => HUSBAND : PERSON_NAME(SEX => M);
end case
;
end record
;
-- implicitly initialized with null value
null
. If the designated type is a type with discriminants, the basic operations include the selection of the corresponding discriminants; if the designated type is a record type, they include the selection of the corresponding components; if the designated type is an array type, they include the formation of indexed components and slices; if the designated type is a task type, they include selection of entries and entry families. Furthermore, the basic operations include the formation of a selected component with the reserved word all
(see 4.1.3).