Ada Resource Association
News and resources for the Ada programming language
Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

4.9.1 Statically Matching Constraints and Subtypes

Static Semantics

1/2
A constraint statically matches another constraint if: 
1.1/2
1.2/2
1.3/2
1.4/2
2/2
A subtype statically matches another subtype of the same type if they have statically matching constraints, and, for access subtypes, either both or neither exclude null. Two anonymous access-to-object subtypes statically match if their designated subtypes statically match, and either both or neither exclude null, and either both or neither are access-to-constant. Two anonymous access-to-subprogram subtypes statically match if their designated profiles are subtype conformant, and either both or neither exclude null. 
3
Two ranges of the same type statically match if both result from the same evaluation of a range, or if both are static and have equal corresponding bounds. 
4
A constraint is statically compatible with a scalar subtype if it statically matches the constraint of the subtype, or if both are static and the constraint is compatible with the subtype. A constraint is statically compatible with an access or composite subtype if it statically matches the constraint of the subtype, or if the subtype is unconstrained. One subtype is statically compatible with a second subtype if the constraint of the first is statically compatible with the second subtype.

Contents   Index   References   Search   Previous   Next 
Ada-Europe Sponsored by Ada-Europe