5. Strings

One needs to be very careful in defining string types, because Ada doesn't provide flexibility. The following guideline might be useful for strongly reusable components.

Guideline1 : Always define constrained string object.

Guideline2 : Always define a variant record type for string type objects as shown below.

type Varaible_record ( Length : positive ) is

record

Value : String( 1 .. Length );

end record;