Skip to content

Commit 376359d

Browse files
committed
Review comments
1 parent a4de816 commit 376359d

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

documentation/Calls.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ functions, or calls to internal runtime support library routines.
2121
* A *dummy argument* is a function or subroutine parameter.
2222
It is *associated* with an *effective argument* at each call
2323
to the procedure.
24+
* The *shape* of an array is a vector containing its extent (size)
25+
on each dimension; the *rank* of an array is the number of its
26+
dimensions (i.e., the shape of its shape).
27+
The absolute values of the lower and upper bounds of the dimensions
28+
of an array are not part of its shape, just their difference (plus 1).
2429
* An *explicit-shape* array has all of its bounds specified; lower
2530
bounds default to 1. These can be passed by with a single address
2631
and their contents are contiguous.
@@ -29,19 +34,21 @@ functions, or calls to internal runtime support library routines.
2934
and whose value does not affect indexed address calculations.
3035
* A *deferred-shape* array (`DIMENSION::A(:)`) is a `POINTER` or `ALLOCATABLE`.
3136
`POINTER` target data might not be contiguous.
32-
* An *assumed-shape* (not size!) array is a dummy argument whose
33-
upper bounds take their values from the *shape* of the effective
34-
argument; lower bounds can be set by the procedure that receives
35-
them and default to 1.
37+
* An *assumed-shape* (not size!) array (`DIMENSION::A(:)`) is a dummy argument
38+
that is neither `POINTER` nor `ALLOCATABLE`; its lower bounds can be set
39+
by the procedure that receives them (defaulting to 1), and its
40+
upper bounds are functions of the lower bounds and the extents of
41+
dimensions in the *shape* of the effective argument.
3642
* An *assumed-length* `CHARACTER(*)` dummy argument
3743
takes its length from the effective argument.
38-
* An *assumed-length* `CHARACTER(*)` result of an external function (C721)
44+
* An *assumed-length* `CHARACTER(*)` *result* of an external function (C721)
3945
has its length determined by its eventual declaration in a calling scope.
4046
* An *assumed-rank* `DIMENSION::A(..)` dummy argument array has an unknown
4147
number of dimensions.
42-
* A *polymorphic* `CLASS(t)` dummy argument has a specific derived type or any
43-
possible extension of that type. An *unlimited polymorphic*
44-
`CLASS(*)` dummy argument can have intrinsic or derived type.
48+
* A *polymorphic* `CLASS(t)` dummy argument, `ALLOCATABLE`, or `POINTER`
49+
has a specific derived type or some extension of that type.
50+
An *unlimited polymorphic* `CLASS(*)` object can have any
51+
intrinsic or derived type.
4552
* *Interoperable* `BIND(C)` procedures are written in C or callable from C.
4653

4754
## Interfaces
@@ -569,6 +576,8 @@ so a `Fa.` prefix can serve to isolate these discretionary names from
569576
other uses and to identify the earliest link-compatible version.
570577
For examples: `Fa.mod.foo`, `Fa.mod.submod.foo`, and (for an external
571578
subprogram that requires an explicit interface) `Fa.foo`.
579+
When the ABI changes in the future in an incompatible way, the
580+
initial prefix becomes `Fb.`, `Fc.`, &c.
572581

573582
## Summary of checks to be enforced in semantics analysis
574583

@@ -640,6 +649,7 @@ the dummy and effective arguments have the same attributes:
640649
* `NON_RECURSIVE` procedures cannot recurse.
641650
* Assumed-length `CHARACTER(*)` functions cannot be declared as `RECURSIVE`, array-valued,
642651
`POINTER`, `ELEMENTAL`, or `PURE' (C723), and cannot be called recursively (15.6.2.1(3)).
652+
* (C823) A function result cannot be a coarray or contain a coarray ultimate component.
643653

644654
`PURE` requirements (15.7): C1583 - C1599.
645655
These also apply to `ELEMENTAL` procedures that are not `IMPURE`.

0 commit comments

Comments
 (0)