Ada Programming/Attributes/'Valid

The Validattribute can be used with an object of any scalar type (that is, numeric or enumeration types) to know whether its value is valid (e.g. not out-of-range, etc.). The result is always True or False; neither Constraint_Error nor any other exception are ever raised.

It is important that the evaluation of the attribute does not count as reading the object, whereas reading an invalid object makes the program erroneous.