ISO/IEC 10206:1991
(Main)Information technology — Progamming languages — Extended Pascal
Information technology — Progamming languages — Extended Pascal
Specifies the syntax and semantics of the programming language by specifying requirements for a processor and for a conforming program. Includes an alphabetical index. Annexes A to G are for information only.
Technologies de l'information — Langages de programmation — Pascal étendu
General Information
Standards Content (Sample)
ISOAEC 10206 : 1991 (E)
V := templ;
bw;
while v <> temp2 do
begin
v := pred(v);
bdY
end
end
end
where templ and temp2 denote auxiliary variables that the program does not otherwise contain, and that
possess the range-type of the type possessed by the variable v.
Examples:
for i := 2 to 63 do
if a[i] > max then max := a[i]
for i := 1 to 10 do
for j := 1 to 10 do
begin
.-
x e- 0;
for k := 1 to 10 do
X
:= x + ml[i,k] * m2[k,j];
m[i,j] := x
end
for i := 1 to 10 do
for j := 1 to i - 1 do
m[i][j] := 0.0
for c : = blue downto red do
q(c)
6.9.3.9.3 Set-member-iteration
set-member-iteration =
‘in’ set-expression .
set-expression = expression .
The set-expression of a set-member-iteration of an iteration-clause of a for-statement shall possess an
unpacked-canonical-set-of-T-type or a packed-canonical-set-of-T-type. The type of the control-variable
of the for-statement shall be compatible with T. The set-expression shall be evaluated prior to the first
execution, if any, of the statement of the for-statement. Each value, if any, that is a member of the value of
the set-expression shall be assignment-compatible with the type possessed by the control-variable. For each
member of the value of the set-expression, the value that is the member shall be attributed to the control-
variable, and then the statement of the for-statement shall be executed. The order in which members of the
value of the set-expression are selected shall be implementation-dependent.
Examples:
for c in hue1 do q(c)
1)
for status in DeviceStatus do
2)
case status of
Busy :
{ respond to Busy } ;
.
88
---------------------- Page: 1 ----------------------
ISOAEC 10206 : 1991 (E)
ParityError :
{ respond to ParityError };
OutOfPaper :
{ respond to OutOfPaper };
LineBreak:
{ respond to LineBreak }
end
6.9.3.10 With-Statements
‘with’ with-list ‘do’ Statement .
with-Statement =
with-list = with-element { ‘,’ with-element } .
with-element = variable-access 1 constant-access .
field-designator-identifier = identifier .
constant-field-identifier = identifier .
identifier .
schema-discriminant-identifier =
A with-Statement shall specify the execution of the Statement of the with-Statement. The constant-access
or variable-access of a with-element shall possess either a type produced from a Schema or a record-type.
The occurrence of a variable-access or constant-access, that possesses a record-type, in the only with-
element in the with-list of a with-Statement shall constitute the defining-Point of each of the field-identifiers
associated with components of the record-type as a field-designator-identifier or constant-field-identifier,
respectively, for the region that is the Statement of the with-Statement; each applied occurrence of the field-
designator-identifier or constant-field-identifier shall denote that component, either of the variable denoted
by the variable-access or of the value denoted by the constant-access, respectively, that is associated with
the field-identifier by the record-type.
An occurrence of a variable-access or constant-access, that possesses a type produced from a Schema
with a tuple, in the only with-element in the with-list of a with-Statement shall constitute the defining-
Point of each discriminant-identifier that is a formal discriminant of the Schema as a schema-discriminant-
identifier for the region that is the Statement of the with-Statement; each applied occurrence of the schema-
discriminant-identifier shall possess the type possessed by the discriminant-identifier and shall denote the
value corresponding to the discriminant-identifier according to the tuple.
The variable-access shall be accessed or the value of the constant-access shall be determined before the
Statement of the with-Statement is executed, and the access to the variable shall establish a reference to the
variable during the entire execution of the Statement of the with-Statement.
The Statement
with VI ,v2,.,vn do s
shall be equivalent to
with vl do
with v2 do
. . .
with vn do s
Examples:
with Good thru do
1)
if month - 12
then begin
89
---------------------- Page: 2 ----------------------
ISOAEC 10206 : 1991 (E)
month :- 1;
:= yeartl
year
end
else month :- monthtl;
{ has the Same effect on the variable Good-thru as
if Good_thru.month = 12
then begin
Good thru.month := 1;
: = Good thru. yeartl
end
else Good thru . month := Good thrumonthtl;
2) with Showscreen do
if (width = 80) and (height = 24)
then { write full Screen }
eise { write line
by line }
3) with unit do
begin
x :=
r;
coordinate. theta : - theta
end;
NOTE - Month and year in Example 1) arc field-designator-identifiers, width and height in Example 2) are schema-
discriminant-identifiers, and r and theta in Example 3) are constant-field-identifiers.
6.9.4 Threats
A Statement S shall be designated as threatening a variable-access V if one or more of the following
Statements is true.
a) S is an assignment-Statement and V is in S.
S contains V in an
actual-Parameter that is an actual variable Parameter corresponding to a
b)
variable Parameter that is not protected (see 6.7.3.1).
c) S is a procedure-Statement that specifies the activation of one of the required procedures read,
readln, or readstr, and V is either in an actual-Parameter of an actual-parameter-list of S or in a
read-parameter-list, a readln-parameter-list, or a readstr-parameter-list of S, respectively.
d) S is a procedure-Statement that specifies activation of the required procedure writestr, and V is in
the string-variable accessed by the activation.
e) S is a procedure-Statement that specifies activation of the required procedure new, and V is the
variable-access p (see 6.7.5.3).
f) S is a procedure-Statement that specifies activation of the required procedure GetTimeStamp, and
V is the variable-access t (see 6.7.5.8).
g) S is a for-Statement and V denotes the control-variable of S.
V is in an array-vari .able, record-variable, or string-variable, and S is threatening a variable-access
h)
closest-contai ni ng V.
i) S is a with-Statement, V is in a with-element in the with-list of S, and S contains a Statement
threatening a variable-access closest-containing a field-designator-identifier having V as a defining-
90
---------------------- Page: 3 ----------------------
ISO/IEC 10206 : 1991 (E)
point.
j) S is a procedure-Statement that specifies the activation of the required procedure bind or unbind,
and V is the variable-access f (see 6.7.5.6).
NOTE - In 6.754, the execution of the required procedures pack and unpack is defined as equivalent to a series
of assignments of the components of the packed and unpacked mays. These equivalent assignments are subject to a)
and i) above.
6.10 Input and output
6.10.1 The procedure read
The Syntax of the Parameter list of read when applied to a textfile shall be
r-d-Parameter-l& = ‘(’ [ file-variable ‘,’ ] variable-access { ‘,’ variable-access } ‘)’ .
If the file-variable is omitted, the procedure shall be applied to the required textfile input, which shall be
implicitly accessible (see 6.11.4.2) by the procedure-Statement.
The following requirements of this subclause shall apply for the procedure read when applied to a textfile;
therein, f shall denote the textfile. The effects of applying read(f,v) to the textfile f shall be defined by
pre-assertions and post-assertions within the requirements of 6.7.5.2. The pre-assertion of read(f,v) shall
be the pre-assertion of get(f). Let t denote a sequence of components having the char-type; let r, s, and u
each denote a value of the sequence-type defined by the structure of the type denoted by text; if u = S( ),
= fO.R.first, where the decision as to
then let t = S( ); otherwise, let u.first = end-of-line; let w = fOT or w
which shall be implementation-dependent; and let r-s-t -u = w -fO.R.rest. The post-assertion of read(f,v)
shall be
(f.M = f0.M) and (f.L-f.R = fO.L-f0.R) and (f.R = t-u) and
(if f.R = S( ) then (ft is totally-undefined) else (ft = f.R.first)).
NOTES
1 The variable-access is not a variable Parameter. Consequently, it may be a variant-selector or a component of a
assignmen t-compatible with it.
packed structure, and the value of the buffer-variable need only be
2 The sequence r represents the initial spaces and end-of-lines skipped during reading; s represents the quantity read;
t-u represents text remaining to be read; and t represents the largest prefix of t-u that does not contain an end-of-line.
a) For n>=l, read(f,vl ,.,vJ shall access the textfile and establish a reference to that textfile for the
remaining execution of the Statement; v1 ,.,v,, shaI1 be variable-accesses, each of which shall possess
a type that is the real-type, is a string-type, or is compatible with the char-type or with the integer-type.
For n>=2, the execution of read(f,vl ,.,v,) shall be equivalent to
begin read(ff ,vl); read(ff,v2,.,v,) end
where ff denotes the referenced textfile.
of read(f,v) shall
If v is a variable-access possessing the char-type (or subrange thereof), the execution
b)
be equivalent to
begin v := fft; get(ff) end
where ff denotes the referenced textfile.
NOTE - 3 To satisfy the post-assertions of get and of read(f,v) requires r = S( ) and length(s) = 1.
C) If v is a variable-access possessing the integer-type (or subrange thereof), read(f,v) shall satisfy the
following requirements. No component of s shall equal end-of-line. The components of r, if any, shall
91
---------------------- Page: 4 ----------------------
ISO/IEC 10206 : 1991 (E)
each, and (s -t -u).first shall not, equal either the char-type value space or end-of-line. Either s shall be
empty or s shall, and s -S((t-u).first) shall not, form a signed-integer according to the Syntax of 6.1.7. It
shall be an error if s is empty. The value of the signed-integer thus formed shall be assignment-compatible
with the type possessed by v and shall be attributed to v.
NOTE - 4 The sequence r represents any spaces and end-of-lines to be skipped, and the sequence s represents the
signed-integer to be read.
d) If v is a variable-access possessing the real-type, read(f,v) shall satisfy the following requirements. No
component of s shall equal end-of-line. The components of r, if any, shall each, and (s -t -u).first shall not,
equal either the char-type value space or end-of-line. Either s shall be empty or s shall, and s -S((t-u).first)
shall not, form a number according to the Syntax of 6.1.7. It shall be an error if s is empty. The value
denoted by the number thus formed shall be attributed to the variable v.
end-of-lines to be skipped, and the sequence
NOTE - 5 The sequence r represents spaces and S represents the
anY
number to be read.
e) If v is a variable-access possessing a fixed-string-type of capacity c, read(f,v) shall satisfy the following
requirements. Length(r) shall equal 0, no component of s shall equal end-of-line, and the remaining
execution of the Statement shall Cause a value to be attributed to v. That value shall be the value of the
fixed-string-type whose components in Order of increasing index consist of the components of s, in Order,
followed by Zero or more spaces. If c exceeds length(s-t), length(t) shall equal 0; otherwise, length(s)
shall equal c.
NOTE - 6 If eoln(f) is initially true, then no characters arc read, and the value of each component of v is a space.
f) If v is a variable-access possessing a variable-string-type of capacity c, read(f,v) shall satisfy the
following requirements. Length(r) shall equal 0, no component of s shall equal end-of-line, and the
remaining execution of the Statement shall Cause a value to be attributed to v. That value shall be the
value of the variable-string-type whose components in Order of increasing index consist of the components
of s, in Order. If c exceeds length(s-t), length(t) shall equal0; otherwise, length(s) shall equal c.
NOTE - 7 If eoln(f) is initially true, then no characters are read, and the value of v is the null-string.
6.10.2 The procedure readln
The Syntax of the Parameter list of readln shall be
readln-pararneter-list = [ ‘(’ ( file-variable 1 variable-access ) { ‘,’ variable-access } ‘)’ ] .
Readln shall only be applied to textfiles. If the file-variable or the entire readln-parameter-list is omitted,
the procedure shall be applied to the required textfile input, which shall be implicitly accessible (see
6.11.4.2) by the procedure-Statement.
Readln(f,vl ,.,v,,) shall access the textfile and establish a reference to that textfile for the remaining
execution of the Statement. The execution of the Statement shall be equivalent to
begin read(ff ,VI,. ,v,); readln(ff) end
where ff denotes the referenced textfile.
Readln(f) shall access the textfile and establish a reference to that textfile for the remaining execution of
the Statement. The execution of the Statement shall be equivalent to
begin while not eoln(ff) do get(ff); get(ff) end
where ff denotes the referenced textfile.
NOTES
92
---------------------- Page: 5 ----------------------
ISOAEC 10206 : 1991 (E)
1 The effect of readln is to place the current file Position just past the end of the current line in the textile. Unless
cunent file Position is therefore at the Start of the next line.
this is the end-of-file Position, the
2 Because the definition of readln makes use of get, the implementation-defined aspects of the post-assertion of get
also apply (see 6.7.5.2).
6.10.3 The procedure write
The Syntax of the Parameter list of write when applied to a textfile shall be
write-parameter-list = ‘(’ [ file-variable ‘,’ ] write-Parameter { ‘, ’ write-Parameter } ‘) ’ .
write-Parameter = expression [ ‘:’ expression [ ‘:’ expression ] ] .
If the file-variable is omitted, the procedure shall be applied to the required textfile output, which shall
be implicitly accessible (see 6.11.4.2) by the procedure-Statement. When write is applied to a textfile f, it
shall be an error if f is undefined or f.M = Inspection (see 6.4.3.6).
For n>=l, write(f,pl ,.,p,) shall access the textfile and establish a reference to that textfile for the ram.ining
execution of the Statement. For n>=2, the execution of the Statement shall be equivalent to
begin write(ff,pl); write(ff ,p2,.,pn) end
where ff denotes the referenced textfile.
Write(f,p), where f denotes a textfile and p is a write-Parameter, shall write a sequence of Zero or more
characters on the textfile f; for each Character c in the sequence, the equivalent of
begin fft := c; put(ff) end
where ff denotes the referenced textfile, shall be applied to the textfile f. The sequence of characters written
shall be a representation of the value of the first expression in the write-Parameter p, as specified in the
remainder of this subclause.
implementation-defined aspects
NOTE - Because the definition of write includes the use of put, the of the post-
assertion of put also apply (see 6.7.5.2).
6.10.3.1 Write-Parameters
A write-Parameter shall have one of the following forms
e : TotalWidth : FracDigits
e : TotalWidth
e
where e shaI1 be an expression whose value is to be written on the file f and shall be of integer-type, real-
type, char-type, Boolean-type, or a string-type, and where TotalWidth and FracDigits shall be expressions
of integer-type whose values shall be designated thefieZd-widthparameters. The value of TotalWidth shall
be greater than or equal to Zero; it shall be an error if the value is less than Zero. The value of FracDigits
shall be greater than or equal to Zero; it shall be an error if the value is less than Zero.
TotalWidth), using a default value for TotalWidth
Write(f,e) shall be equivalent to the form write(f,e :
that depends on the type of e; for integer-type, real-type, and Boolean-type, the default values shall be
implementation-defined.
Write(f,e : TotalWidth : FracDigits) shall be applicable only if e is of real-type (see 6.10.3.4.2).
93
---------------------- Page: 6 ----------------------
ISOAEC 10206 : 1991 (E)
6.10.3.2 Char-type
If e is of char-type, the default value of TotalWidth shall be one. The representation written on the file f
shall be
if TotalWidth > 0,
(TotalWidth - 1) spaces, the Character value of e;
if TotalWidth=O,
no characters.
6.10.3.3 Integer-type
If e is of integer- the decimal representation of the value of e sha.H be written on the file f. Assume a
ttype,
function
function IntegerSize ( x : integer ) : integer ;
{ returns the number of digits, z, such that
lOpow(z-l)Iabs(x)~10powz}
and let IntDigits be the positive integer defined by
ife=O
then IntDigits := 1
else IntDigits := IntegerSize(e);
then the representation shall consist of
a) if TotalWidth >= IntDigits + 1:
(TotalWidth - IntDigits - 1) spaces,
the sign Character: ‘-’ if e < 0, otherwise a space,
IntDigits digit-characters of the decimal representation of abs(e).
b) if TotalWidth < IntDigits + 1:
if e < 0 the sign Character ‘-‘,
IntDigits digit-characters of the decimal representation of abs(e).
6.10.3.4 Real-type
If e is of real-type, a decimal representation of the value of e, rounded to the specified number of significant
figures or decimal places, shall be written on the file f.
6.10.3.4.1 The floating-Point representation
Write(f,e : TotalWidth) shall Cause a floating-Point representation of the value of e to be written. Assume
functions
function RealSize ( y : real ) : integer ;
{ Returns the value, z, such that 10.0 (z-l) <=
WY)
POW
function Truncate : real ; DecPlaces integer ) : real ;
(Y
{ Returns the val ue of y after truncatio n to DecPlaces decimal aces }
Pl
let ExpDigits be an implementation-defined value representing the number of digit-characters written in
an exponent;
let ActWidth be the positive integer defined by
,
94
---------------------- Page: 7 ----------------------
ISOAEC 10206 : 1991 (E)
if TotalWidth >= ExpDigits + 6
then ActWidth := TotalWidth
else ActWidth := ExpDigits + 6;
and let the non-negative number ewritten, the positive integer DecPlaces, and the integer ExpValue be
defined by
DecPIaces := ActWidth - ExpDigits - 5;
if e = 0.0
then begin ewritten := 0.0; ExpValue := 0 end
else
begin
eWritten := abs(e);
ExpValue := RealSize ( eWritten ) - 1;
eWritten := eWritten / 10.0 pow ExpValue;
eWritten := eWritten + 0.5 * 10.0 pow(-DecPlaces);
if eWritten >= 10.0
then
begin
:= eWritten / 10.0;
eWritten
ExpValue := ExpValue + 1
end;
:= Truncate ( ewritten, DecPIaces )
eWritten
end;
then the floating-Point representation of the value of e shall consist of
the sign Character
‘-’ if (e < 0.0) and (ewritten > O.O), otherwise a space ),
(
the leading digit-character of the decimal representation of ewritten,
the Character ‘.’ ,
the next DecPlaces digit-characters of the decimal representation of
ewritten,
an implementation-defined exponent Character
(either ‘e’ or ‘El),
the sign of ExpValue
‘-’ if ExpValue < 0, otherwise ‘+’ ),
(
the ExpDigits digit-characters of the decimal representation of
ExpValue (with leading Zeros if the value requires them).
6.10.3.4.2 The fixed-Point representation
Write(f,e : TotalWidth : FracDigits) shall Cause a fixed-Point representation of the value of e to be written.
Assume the functions RealSize and Truncate described in 6.10.3.4.1;
let ewritten be the non-negative number defined by
if e = 0.0
then eWritten := 0.0
else
begin
eWritten := abs(e);
eWritten := eWritten + 0.5 * 10.0 pow(-FracDigits);
eWritten := Truncate ( ewritten, FracDigits )
end;
95
---------------------- Page: 8 ----------------------
ISO/IEC 10206 : 1991 (E)
let IntDigits be the positive integer defined by
if eWritten < 1
then IntDigits := 1
eise IntDigits := RealSize ( ewritten );
and let MinNumChars be the positive integer defined by
MinNumChars := IntDigits + FracDigits + 1;
if (e < 0.0) and (ewritten > 0.0)
then MinNumChars := MinNumChars + 1; {‘-’ required}
then the fixed-Point representation of the value of e shall consist of
if TotalWidth >= MinNumChars,
(TotalWidth - MinNumChars) spaces,
the Character ‘-’ if (e < 0.0) and (ewritten > O.O),
the first IntDigits digit-characters of the decimal representation of
the value of ewritten,
the Character ‘.‘,
the next FracDigits digit-characters of the decimal representation of
the value of ewritten.
- At least MinNumChars characters are written. If TotalWidth is less than this value, no initial spaces arc
NOTE
written.
6.10,3.5 Boolean-type
If e is of Boolean-type, a representation of the word true or the word false (as appropriate to the value of e)
shall be written on the file f. This shall be equivalent to writing the appropriate Character-string ‘True’ or
‘False’ (see 6.10.3.6), where the case of each letter is implementation-defined, with a field-width Parameter
of TotalWidth.
6.10.3.6 String.types
If the value of e is a string-type value with a length of n, the default value of TotalWidth shall be n. The
representation shall consist of
if TotalWidth > n,
(TotalWidth - n) spaces,
if n > 0,
the first through n-th characters of the value of e in that Order.
if 1 <= TotalWidth <= n,
the first through TotalWidth-th characters in that Order.
if TotalWidth = 0,
no characters.
6.10.4 The procedure writeln
The Syntax of the Parameter list of writeln shall be
[ ‘(’ ( file-variable 1 write-Parameter ) { ‘, ’ write-Parameter } ‘) ’ ] .
writeln-parameter-list =
Writeln shall only be applied to textfiles. If the file-variable or the writeln-parameter-list is omitted, the
procedure shall be applied to the required textfile output, which shall be implicitly accessible (sec 6.11.4.2)
by the procedure-Statement.
96
---------------------- Page: 9 ----------------------
ISOAEC 10206 : 1991 (E)
Writeln(f,pr,.,p,) shall access the textfile and establish a reference to that textfile for the remaining
execution of the Statement. The execution of the Statement shall be equivalent to
,.,pJ; writeln(ff) end
begin write(ff ,pl
where ff denotes the referenced textfile.
Writeln shall be defined by a pre-assertion and a post-assertion using the notation of 6.7.5.2.
pre-assertion: (f0 is not undefined) and (f0.M = Generation) and (f0.R = S( )).
post-assertion: (f.L = (fO.L-S(end-of-line))) and (ft is totally-undefined) and (f.R = S( )) and (f.M =
Generation), where S(end-of-line) is the sequence consisting solely of the end-of-line component
defined in 6.4.3.6.
NOTE - Writeln(f) terminates the partial line, if any, that is being generated. By the conventions of 6.752 it is an
enror if the pre-assertion is not true Prior to writeln(f).
6.10.5 The procedure page
It shall be an error if the pre-assertion required for writeln(f) (see 6.10.4) does not hold Prior to the activation
of Page(f). If the actual-parameter-list is omitted, the procedure shall be applied to the required textfile
output, which shall be implicitly accessible (see 6.11.4.2) by the procedure-Statement. Page(f) shall Cause
an implementation-defined effect on the textfile f, such that subsequent text written to f will be on a new
page if the textfile is printed on a suitable device, shall perform an implicit writeln(f) if f.L is not empty and
if f.L.last is not the end-of-line component (see 6.4.3.6), and shall Cause the buffer-variable ftto become
totally-undefined. The effect of inspecting a textfile to which the page procedure was applied during
generation shall be implementation-dependent.
6.11 Modules
6.11.1 Module-declarations
-
module-declaration module-heading [ ‘;’ module-block ]
module-identification ‘ ;’ module-block .
I
module-heading = ‘module’ identifier [ interface-directive ]
[ ‘ (’ module-parameter-list ‘) ’ ] ‘ ;’
interface-specification-part
import-part
{ constant-definition-part
1 type-definition-part
1 variable-declaration-part
1 procedure-and-function-heading-part }
‘end’ .
module-parameter-list identifier-list .
procedure-and-function-heading-part = ( procedure-heading 1 function-heading ) ‘;’ .
module-identification ‘module’ module-identifier implementation-directive .
module-identifier = identifier .
97
---------------------- Page: 10 ----------------------
ISOAEC 10206 : 1991 (E)
module-block = import-part
{ constant-definition-part
1 type-definition-part
1 variable-declaration-part
1 procedure-and-function-declaration-part }
[ initialization-part ]
[ finalization-part ]
‘end’ .
initialization-part = ‘to’ ‘begin’ ‘do’ Statement ‘;’ .
finalization-part = ‘to’ ‘end’ ‘do’ Statement ‘;’ .
The occurrence of an identifier in the module-heading of a module-declaration shall constitute its defining-
Point as a module-identifier for each region that is either the identifier of a module-heading contained by
the program or the module-identifier of a module-identification contained by the program.
- 1 The module-identifier has meaning only in places where a module-identifier is either defined or referenced.
NOTE
A module-identifier does not otherwise affect the program.
The occurrence of a module-block in a module-declaration that contains a module-heading shall associate
that module-block with that module-heading. The occurrence of a module-block in a module-declaration
that contains a module-identification shall associate that module-block with the module-heading containing
the defining-Point of the module-identifier of that module-identification. There shall be exactly one module-
block associated with a module-heading. A module-block together with its associated module-heading shall
constitute a module, and each shall be said to be associated with that module.
if and only if a
An interface-directive shall occur in a module-heading of a module-declaration mod ule-
block does not occur in the module-declaration.
Esch identifier having a defining-Point as a module-identifier in a module-heading of a module-declaration
containing the interface-directive interface shall have exactly one of its applied occurrences in a module-
identification of a module-declaration containing the implementation-directive implementation. These two
module-declarations shall both be program-components of the program-block (see 6.13).
For any two distinct modules A and B such that A supplies B and B supplies A, neither the module-block
of A nor the module-block of B shall contain an initialization-Part; neither module-block shall contain a
finalization-Part; and an expression contained by the module-heading of either A or B shall be nonvarying
(see 6.8.2).
NOTES
2 This tan happen, for example, when the module-heading of A exports an interface that is imported by the module-
block, but not the module-heading, of B; and the module-heading of B exports an interface that is imported by the
module-heading or module-block of A.
3 Modules may directly or indirectly supply each other. For example, if A supplies B and B supplies C and C supplies
A, then none of the three modules tan have an initialization-part or a finalization-Part, and any discriminant-values
and subrange-bounds in their module-headings must be nonvarying.
The identifiers contained by the module-parameter-list of a module-heading shaI1 have distinct spellings,
and for each such identifier there shall be a defining-Point as a variable-identifier with the same spelling
for the region that is the module-heading. If the spelling is neither input nor output, the variable-identifier
either shaI1 be local to the module or shall be an imported variable-identifier that is a module-Parameter.
If the spelling is input or output, the occurrence of the identifier contained by the module-parameter-list
shall constitute a defining-Point for the region that is the module-heading as a variable-identifier denoting
the required textfile input or output, respectively. If the variable-identifier is local to the module or has
the spelling input or output, both the variable-identifier and any variable it denotes shaI1 be designated a
---------------------- Page: 11 ----------------------
ISO/IEC 10206 : 1991 (E)
module-Parameter. The binding of a variable that is a module-Parameter to entities extemal to the
program
shall be implementation-defined.
NOTES
4 The extemal representation of extemal entities bound to module-Parameters is not defined by this International
Standard.
5 Furthermore, two different modules may specify that two different variables whose variable-identiers have the same
spelling are to be bound to extemal entities - this International Standard does not specify whether such variables are
to be bound to the same extemal entity or to different extemal entities.
6 Variables that are module-Parameters are not necessarily beund when the module is activated.
6.11.2 Export-Part
An export-part shall introduce an identifier to denote an interface. An export-list shall introduce one or
more constituent-identifiers.
interface-specification-part = ‘export’ export-part ‘;’ { export-part ‘;’ } .
export-part = identifier ‘=’ ‘(’ export-list ‘)’ .
export-list = ( export-clause 1 export-range ) { ‘,’ ( export-clause 1 export-range ) } .
export-clause = exportable-name ] export-renaming-clause .
export-renaming-clause = exportable-name ’ =>’ identifier .
exportable-name = constant-name
1 type-name
schema-name
I
1 [ ‘protected’ ] variable-name
] procedure-name
1 function-name .
export-range = first-constant-name ‘.’ last-constant-name .
first-constant-name = constant-name .
last-constant-name = constant-name .
constituent-identifier = identifier .
interface-identifier = identifier .
The occurrence of an identifier in an export-part shall constitute its defining-Point as an interface-identifier
for ea
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.