From Miles.Ellis@Educational-Technology-Resources-Centre.oxford.ac.uk  Mon Oct  9 20:48:16 1995
Received: from oxmail2.ox.ac.uk (oxmail2.ox.ac.uk [163.1.2.1]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id UAA20050 for <sc22wg5@dkuug.dk>; Mon, 9 Oct 1995 20:47:30 +0100
Received: from vax.ox.ac.uk by oxmail2 with SMTP (PP);
          Mon, 9 Oct 1995 20:47:14 +0100
Received: from 163.1.85.1 by vax.ox.ac.uk (MX V4.1 VAX) with SMTP;
          Mon, 09 Oct          1995 18:44:43 +0100
X-Sender: MELLIS@vax.ox.ac.uk
Message-ID: <v01530508ac9f0ffb61fb@[163.1.85.1]>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Mon, 9 Oct 1995 18:45:39 +0100
To: sc22wg5 <sc22wg5@dkuug.dk>
From: Miles.Ellis@Educational-Technology-Resources-Centre.oxford.ac.uk (Miles Ellis)
Subject: CD Ballot Comments - 7 of 7

7.      UK   Substantive comments:

1     Section 4.4.1
      39:25.   Delete "of intrinsic type".
      Rationale:  The present sentence is not true for a pointer
      component of derived type.

2     Section 7.1.6.2
      93:40-44 and 94:1. Delete items (7), (8) and (9) and renumber.
      94:14. After "or" add "a reference to any other intrinsic function
      where each argument is a restricted expression,"
      Rationale: Specification expressions allow references to certain
      user-defined functions, but not to intrinisic functions.  This is
      an unnecessary and counter-intuitive irregularity.  These changes
      allow intrinsic functions in this context.

3     Section 8.1.4.4.1
      125:6. Delete 'nonpointer'.
      Rationale: The UK opposes interpretation 179 as an unnecessary technical
      change to Fortran 90 (see e-mail SC22WG5.858 and subsequent
      correspondence).  Since the Fortran 95 CD assumes interpretation 179,
      this change removes it.

4     Section 12.6
      In this section, "no side effects" is not meaningful as a definition.
      210:39. Delete 'has no side effects. In addition, it'.
      210:42. Replace by
              '(3) is an intrinsic function,
               (4) is an intrinsic elemental subroutine, or'
      211:1. Replace '(4)' by '(5)'.
      211:3. After 'pure procedure' add 'has no side effects that inhibit
             its use in parallel contexts. It'
      Glossary:
      295:12. Replace 'has no side effects' by 'has the <prefix-spec> PURE
      or ELEMENTAL, is an <intrinsic> <function>, is an intrinsic
      <elemental> <subroutine>, {or is a statement function that
      references only pure functions}'.
      295:38-41. Delete (i.e. delete definition of 'side effects').

5     Section 12.7.2
      213:11-12. Replace sentence 'For ...'  by
       'For a non-intrinsic procedure, an actual argument shall be scalar
       if any specification depends on the value of the corresponding
       dummy argument.'





      213:18+. Add:
       'An example of an elemental procedure with an argument that is not
       permitted to be an array is

       ELEMENTAL REAL FUNCTION F(A,N)
         REAL A
         INTEGER N ! The corresponding actual argument must be scalar
         REAL WORKARRAY(N)
         ...
       END'

      Rationale: The present wording is far too restrictive. For example, it
      does not permit

       ELEMENTAL REAL FUNCTION F(A)
          REAL A
          REAL (SELECTED_REAL_KIND(PRECISION(A)*2)) WORK
          ...
       END

      Also, it needs to apply to subroutines as well as functions.


6     There are problems with the draft standard's description of default
      initialization, in particular, when such initialization occurs.

      To avoid excess verbiage (repeating ourselves at least 4 times), we
      define a new term:

      37:39+. (Section 4.4)  Add sentence to end of paragraph:
      "A <<direct component>> of a derived type is a component at any level
       of component selection for which no intervening component has the
       POINTER attribute."

       [Note: Thus, all the top-level components are direct components, plus
              all components thereof down to the ultimate components inclusive]
       [Note: Such components are those that most Fortran processors would
              keep together in a single block of storage.  In the case of a
              pointer direct component, it is the address or descriptor or
              dope vector that is stored.

              The term "direct component" is chosen to reflect the idea that
              they are stored "directly" in the derived type, i.e. that no
              pointers are followed going from the derived type to the
              component.]

      The new term should also be added to the Glossary (at 291:33+).


      For the following edits we suggest that the rationales and/or examples
      could be added to the standard as notes; the UK will make the necessary
      editorial changes if WG5 agrees.

      Using the new term we have the following changes:

      285:7. (Section 14.7.3) item (3)  Change "ultimate" to "direct".
      Rationale: see the changes we propose for 14.7.5 item (16)
      [Example: same example as 14.7.5 item 16, change last two lines to:
               TYPE(T3), SAVE :: X]

      285:8. (Section 14.7.3) item (3) Add the following condition
      before ", and":
      "and the variables are not accessed by use or host association, do not
      have the ALLOCATABLE attribute, and either have the SAVE attribute or
      are declared in a main program, MODULE or BLOCK DATA program-unit"
      Rationale: (i) dummy arguments are never initially defined, they might
                     be defined on entry - 14.7.5 item (20);
                (ii) variables inherited by use or host association have their
                     initial definition status set by their parent, not by the
                     USEr or internal proc (for instance, they might have been
                     explicitly initialized in their home scope);
               (iii) ALLOCATABLE arrays are never initially defined; they can
                     become defined on allocation - 14.7.5 item (16).

      286:13. (Section 14.7.5) item (16)  Change "ultimate component"
                                to "direct component".
      Rationale: not just ultimate components can become defined in this
               manner, but top-level and intermediate ones for which default
               init has been specified.
      [Example:
               TYPE T1
                  INTEGER C1
               END TYPE
               TYPE T2
                  TYPE(T1) :: C2 = T1(0)
               END TYPE
               TYPE T3
                  TYPE(T2) :: C3
               END TYPE
               TYPE(T3), POINTER :: X
               ALLOCATE(X)
               ! According to the draft, nothing gets defined, because the
               ! only ultimate component is C1 of T1 (X%C3%C2%C1), and C1
               ! does not have default initialization specified.
               ! With the change, the direct component C2 of T2 (X%C3%C2) has
               ! default initialization and is thus defined.]


      286:21. (Section 14.7.5) item (19) Change "some components" to
                               "any direct components".
      Rationale: this would define components "below" pointers, but these are
               not defined, only direct components are so defined.
      [Example:
               SUBROUTINE SUB
               TYPE T1
                  INTEGER :: C1 = 42
               END TYPE
               TYPE T2
                  TYPE(T1), POINTER :: C2
               END TYPE
               TYPE T3
                  TYPE(T2) :: C3
               END TYPE
               TYPE(T3) X ! is unSAVEd local, not dummy etc.
               ! According to the draft, since some component (X%C3%C2%C1) has
               ! default initialization specified, it becomes defined on entry
               ! to the subprogram.  But X%C3%C2 is a pointer!
               ! With the change, no part of X is default-initialized because
               ! no "direct component" has default initialization.]

      286:23. (Section 14.7.5) item (20) Change "ultimate component" to
                               "direct component".
      Rationale: same reason as item (16), similar example (just change X from
               a local pointer to a non-pointer dummy with INTENT(OUT)).

      286:25. (Section 14.7.5) item (21) Insert "nonpointer" before "function".
      Rationale: if the function result is a pointer, nothing gets defined on
               entry regardless of default init.  (Definition might occur if
               the pointer is ALLOCATEd, but not if it is NULLIFY-ed or
               pointer-assigned).

      286:26. (Section 14.7.5) item (21) Change "ultimate component" to
                               "direct component".
      Rationale: same reason as items (16) and (20), similar example (just
               change X to a non-pointer function result).

8.      UK  Editorial comments

7     global.  Change font for "FORTRAN 66" and "FORTRAN 77" to be
      consistently large "F" with "ORTRAN" in small capitals as in 1.5.2,
      pages 3-4.
8     xiii:29. Change to "(3) Pointer initialization and structure default
      initialization".
      Rationale: Default initialization is available only for structures (in
      the context of this line)..
9     xiv:13.  Change "is" to "was"
      Rationale: Fortran 90 is in the past (see, for example, 3:31).
10    xv:28-29.  Delete "the event...scoping unit" and insert "situations that
      caused them in Fortran 90 to have undefined allocation status"
      Rationale: An allocatable array may lose it allocation status on
      return from a scoping unit other than the one in which it was allocated.
11    6:34. Change "Programmers should" to "It is recommended that
      programmers" i.e. revert to form of words in N1094 (and Fortran 90).
      Rationale: Softer, more objective form is preferable.  Removing "it is
      recommended" from items (4), (5) and (6) is acceptable since these are
      directed to Fortran committees and vendors rather than to the general
      public.
12    38:9-10.  Replace sentence by "Default initialization applies to dummy
      arguments with INTENT(OUT)."
      Rationale: Default initialization does not apply to a number of
      entities, so it is confusing to specify only one.  However the
      information may be helpful, so the sentence is rephrased positively.
13    40:13. Delete spurious quotation mark.
14    40:16. Delete 'value'.
      Rationale:  The term used in the standard is 'structure constructor',
      see 44:33.
15    120:37. Change "permitted"  to "permissible".
      Rationale: WG5 has been requested by non-English speaking countries not
      to use unnecessary variation in descriptions.  "permissible" is used in
      the corresponding alternative text in Annex B (300:11, 300:13), and
      four times in corresponding text in section 8.2 (129:9-12).
16    299:5 and 302: 2,3.  Change "are" to "were", three times in all.
      Rationale: Fortran 90 is in the past.
17    299:25+. Add new paragraph: "In this and other annexes "FORTRAN 66" is
      used as the informal name for the first Fortran standard, ISO 1539:1972,
      which was technically identical to ANS X3.9-1966."
      Rationale: "FORTRAN 66" is used in Annexes B and C but never defined.
18    301:12. Change "R504" to "R512 in section 5.1.2.3".  In the following
      line add "(10)" before "In an".
      Rationale:  Current text makes no sense.
19    301:26. It would be better if "(11)" were on the following line.
20    302:19. Delete "computed GO TO statement or".
      Rationale: the computed GO TO statement is itself obsolescent.

=======================================================================

   Dr Miles Ellis                                          CCCCCCCCCCC
   Director: Educational Technology Resources Centre      C           C
   University of Oxford, 37-41 Wellington Square          C  E
   Oxford  OX1 2JF, ENGLAND                               C     T
                                                          C        R
   Telephone: +44 1865 270528     Fax: +44 1865 270527    C           C
   Email:     Miles.Ellis@etrc.ox.ac.uk                    CCCCCCCCCCC

=======================================================================


