Attributes


Attributes

Attributes are Data associated to types. The behave like functions, but are compilation defined.

<type>'First; -- First value of the type
<type>'Last;  -- Last value of the type

<type>'Succ (<val>);  -- Successive value
<type>'Pred (<val>);  -- Predecessor 
   --If the values leak, Constraint_Error is raised

<type>'Pos(<val>);  -- Position, returns Natural 0 ...
<type>'Val(<Nat>);  -- Value of the ordered at Nat, returns <type>

<type>'Image(<val>);     -- Name of the value, returns a string
<type>'Value(<string>);  -- Value named at string, returns <type>
   --If the value conversion fail, Constraint_Error is raised