Ada Programming/Attributes/'Valid Value

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Description

[edit | edit source]

The 'Valid_Value attribute is defined for enumeration types other than those in package Standard. This attribute is a function that takes a String, and returns Boolean. T'Valid_Value (S) returns True if and only if T'Value (S) would not raise Constraint_Error.