|Ada 95 Quality and Style Guide||Chapter 7|
7.6.2 Package System
Avoid using package System constants except in attempting to generalize other machine-dependent constructs.
Because the values in this package are implementation-provided, unexpected effects can result from their use.
If you must guarantee that physical record layouts will remain the same between implementations, you can express record fields by their first and last bit positions as shown in the Ada Reference Manual (1995, §13.5.1). Static expressions and named numbers should be used to let the compiler compute the endpoints of each range in terms of earlier fields. In this case, greater portability can be achieved by using System.Storage_Unit to let the compiler compute the value of the named number. However, this method might not work for all values of System.Storage_Unit.
Do use package System constants to parameterize other implementation-dependent features (see Pappas (1985, §13.7.1).
|< Previous Page||Search||Contents||Index||Next Page >|