Enumerated indices are not generally a special case, as enumeration values may be used as indices in C. However, if the Ada enumeration type has an enumeration rep clause which leaves holes in the enumeration sequence, then a table is used to translate the Ada enumeration values to a contiguous sequence of values starting at zero, as needed for indexing. In the general case, the low bound of an Ada array is subtracted out to produce a zero-based array for C indexing.
MapuSoft
Comments