[Home] [Prev] [Next] [Index]

8.6 The Package Standard

8.6 The Package Standard

1
The predefined types (for example the types BOOLEAN, CHARACTER and INTEGER) are the types that are declared in a predefined package called STANDARD; this package also includes the declarations of their predefined operations. The package STANDARD is described in Annex C. Apart from the predefined numeric types, the specification of the package STANDARD must be the same for all implementations of the language.

2
The package STANDARD forms a declarative region which encloses every library unit and consequently the main program; the declaration of every library unit is assumed to occur immediately within this package. The implicit declarations of library units are assumed to be ordered in such a way that the scope of a given library unit includes any compilation unit that mentions the given library unit in a with clause. However, the only library units that are visible within a given compilation unit are as follows: they include the library units named by all with clauses that apply to the given unit, and moreover, if the given unit is a secondary unit of some library unit, they include this library unit.

Notes:

3
If all block statements of a program are named, then the name of each program unit can always be written as an expanded name starting with STANDARD (unless this package is itself hidden).

4
If a type is declared in the visible part of a library package, then it is a consequence of the visibility rules that a basic operation (such as assignment) for this type is directly visible at places where the type itself is not visible (whether by selection or directly). However this operation can only be applied to operands that are visible and the declaration of these operands requires the visibility of either the type or one of its subtypes.

5
References:

*
applicable with clause 10.1.1

*
block name 5.6

*
block statement 5.6

*
declaration 3.1

*
declarative region 8.1

*
expanded name 4.1.3

*
hiding 8.3

*
identifier 2.3

*
implicit declaration 3.1

*
library unit 10.1

*
loop statement 5.5

*
main program 10.1

*
must 1.6

*
name 4.1

*
occur immediately within 8.1

*
operator 6.7

*
package 7

*
program unit 6

*
secondary unit 10.1

*
subtype 3.3

*
type 3.3

*
visibility 8.3

*
with clause 10.1.1



[Home] [Prev] [Next] [Index]

documentation@rational.com
Copyright © 1993-2000, Rational Software Corporation. All rights reserved.