8.20: web.adda/ada/predefined attributes:
. what are Ada's reserved attributes?
here they are renamed for clarification
(these are just the most basic ones;
there are many more for floats, etc):
type'base -- the unconstrained subtype;
enum in type'first .. type'last,
A'range(N) = A'first(n) .. A'last(n) -- array's nth dimension;
type'value(enumcode number or image string);
type'image(value) is a string;
type'code(value) -- the integer representing the value (aka pos);
type'codebitsize -- obj's fixed size (when packed);
type'imagesize -- #characters(for largest expression);
type'++(value) -- successor;
type'--(value) -- predecessor .
Aspects and Attributes:
. Some aspects have corresponding attributes .
Aspects are properties of entities
that can be specified by the Ada program;
unless otherwise specified below,
aspects can be specified using an aspect_specification.
Attributes are properties of entities
that can be queried by an Ada program.
. when ada uses oop-style calls
Ada's x.f syntax means the same as adda's x`f;
so, when Ada is designing their attributes,
that namespace doesn't conflict with
their objects' or types' namespace
because of qualifier differences:
ie, x'attribute vs
x.component and x.message() .
. some of ada's attrib's were obsoleted .