@@ -21,6 +21,11 @@ functions, or calls to internal runtime support library routines.
21
21
* A * dummy argument* is a function or subroutine parameter.
22
22
It is * associated* with an * effective argument* at each call
23
23
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).
24
29
* An * explicit-shape* array has all of its bounds specified; lower
25
30
bounds default to 1. These can be passed by with a single address
26
31
and their contents are contiguous.
@@ -29,19 +34,21 @@ functions, or calls to internal runtime support library routines.
29
34
and whose value does not affect indexed address calculations.
30
35
* A * deferred-shape* array (` DIMENSION::A(:) ` ) is a ` POINTER ` or ` ALLOCATABLE ` .
31
36
` 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.
36
42
* An * assumed-length* ` CHARACTER(*) ` dummy argument
37
43
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)
39
45
has its length determined by its eventual declaration in a calling scope.
40
46
* An * assumed-rank* ` DIMENSION::A(..) ` dummy argument array has an unknown
41
47
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.
45
52
* * Interoperable* ` BIND(C) ` procedures are written in C or callable from C.
46
53
47
54
## Interfaces
@@ -569,6 +576,8 @@ so a `Fa.` prefix can serve to isolate these discretionary names from
569
576
other uses and to identify the earliest link-compatible version.
570
577
For examples: ` Fa.mod.foo ` , ` Fa.mod.submod.foo ` , and (for an external
571
578
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.
572
581
573
582
## Summary of checks to be enforced in semantics analysis
574
583
@@ -640,6 +649,7 @@ the dummy and effective arguments have the same attributes:
640
649
* ` NON_RECURSIVE ` procedures cannot recurse.
641
650
* Assumed-length ` CHARACTER(*) ` functions cannot be declared as ` RECURSIVE ` , array-valued,
642
651
` 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.
643
653
644
654
` PURE ` requirements (15.7): C1583 - C1599.
645
655
These also apply to ` ELEMENTAL ` procedures that are not ` IMPURE ` .
0 commit comments