|Ada 95 Quality and Style Guide||Chapter 7|
7.6.8 Unchecked Conversion
Avoid dependence on Ada.Unchecked_Conversion (see Guideline 5.9.1).
The unchecked type conversion mechanism is, in effect, a means of bypassing the strong typing facilities in Ada. An implementation is free to limit the types that may be matched and the results that occur when object sizes differ.
Unchecked type conversion is useful in implementation-dependent parts of Ada programs where lack of portability is isolated and where low-level programming and foreign language interfacing are the objectives.
If an enumeration representation clause is used, unchecked type conversion is the only language-provided way to retrieve the internal integer code of an enumeration value.
|< Previous Page||Search||Contents||Index||Next Page >|