From maine@altair.dfrc.nasa.gov  Fri Mar  8 16:53:49 1996
Received: from altair.dfrc.nasa.gov ([130.134.34.72]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id QAA29920 for <sc22wg5@dkuug.dk>; Fri, 8 Mar 1996 16:53:31 +0100
Received: by altair.dfrc.nasa.gov (SMI-8.6/SMI-SVR4)
	id HAA00977; Fri, 8 Mar 1996 07:53:59 -0800
Date: Fri, 8 Mar 1996 07:53:59 -0800
Message-Id: <199603081553.HAA00977@altair.dfrc.nasa.gov>
From: Richard Maine <maine@altair.dfrc.nasa.gov>
To: sc22wg5@dkuug.dk
Subject: Edits made to X3J3/95-007R2

                                                                N1177

To: X3J3 and WG5
From: Richard Maine
Subject: Edits made to X3J3/95-007R2

The following changes have been made relative to X3J3/95-007r2 (N1166)
to produce X3J3/96-007, also known as N1176, which is being circulated
for final review prior to the DIS ballot on the f95.

This list includes the changes formerly mentioned in paper
X3J3/96-030, a fix for UK substantitive issue 5 as
described in paper X3J3/96-050, plus fixes for a few other
comments as described in paper X3J3/96-038.

I have kept a copy that has change bars relative to X3J3/95-007r2,
but the version for the DIS ballot has all the change bars cleared.

----------Misc fixes.

[xiii:42]  Replace 'and' by 'simultaneously and then'.

[xv:29] Delete comma.

[xv:30] ", in order to decrease" -> "; this decreases"

[14:17] "Statement function" -> "Statement function statement"

[27:29-40]  Merge notes 3.8 and 3.9 as follows.  Start with
                    An "!" or ";" in character position 6
       as in note 3.8.  Then use the rest of the text from 3.9,
       following "position 6".  Change "another" to "an".
       Result replaces the old 3.8.  Delete the old 3.9

[32:1] Delete "unsigned and".  No such term is defined.

[33:21-22] Replace 'underflow occurs ... below' by 'the exact result of
      an operation is negative but rounding produces a zero'.

[40:14] Delete hyphen from 'non-pointer'.

[49:1] "type-spec" -> "<type-spec>"

[51:27-31] Change the note to read

     An interface body may be specified for a dummy or external
     function whose result has a character length parameter value of *
     only if the function is not invoked.  This is because this
     characteristic has to be specified to be the same in the interface
     body as in the procedure definition, but in order to invoke such a
     procedure, the calling routine is required to specify a length
     other than *.

[54:2] "rank or the rank and shape are" -> "rank or shape is"

[61:16] Change 'an' to 'a nonpointer'.

[83:28] Change 'PROCES' to 'PROCESS'.

[115:25] Add "is a scalar variable that" after "It".
         (because rank is an attribute).

[115:26] Add ", and this type shall be integer type" after "FORALL" to
         be similar to comparable sentences at 280:41 and 280:45.

[115:47] Capitalize the first word and add ',' at the end.
[115:48] Capitalize the first word and add ', and' at the end.
[116:1] Capitalize the first word and add '.' at the end.

[119:16] Replace '<index-name> variables' by '<forall-header> expressions'. 

[129:6] Add period at end of line in constraint after R834.

[199:5] "shall" -> "shall not" in 4th constraint after R1215

[212:5-8] Capitalize the first word of each item.

[245:31] "is absent or present with the value..."
         -> "is absent or has the value..."
         The original wording invited strange misreadings (which could
         alternatively be fixed by adding "is" before "present").  This
         fix also repairs a bad line break.

[253:31] 13.14.67 heading.  MAXLOC -> MAXVAL

[256:19 13.14.72 heading.  MAXLOC -> MINVAL

[260:27] 13.14.83 heading.  MAXLOC -> PRODUCT

[266:37-40] Replace all 4 lines by

  Case (iv): If B is of type real and is zero, then
         (a) If the processor cannot distinguish between positive and
             negative real zero, the value of the result is |A|.
         (a) If B is positive real zero, the value of the result is |A|.
         (b) If B is negative real zero, the value of the result is -|A|.

[268:37] 13.14.105 heading.  MAXLOC -> SUM

[273:30] "present with" -> "has"

[280:41] "Its only attributes are" -> "It is a scalar variable that has".

[280:43] Add "; it has no other attributes" before the period.

[280:45] "Its only attributes are" -> "It is a scalar variable that has".

[281:2] Add "; it has no other attributes" before the period.

[293:30] Delete hyphen from 'non-pointer'.

[305:30] Replace R504 by R512.
[305:31] Replace (10) by (11).

[305:45] "in" -> "In"

[310:22] "compoents" -> "components"

[316:12] "i" -> "I"

--------------Resolution of UK substantitive item 5.
Most of this is from paper X3J3/96-050, except for the deletion of
Note 12.36, which is clearly needed because it directly referred
to the deleted sentence above it.  I also consistently used :: syntax
throuought the added example, and I added "s" to "expression".

[214:4+] Add the following new constraint:

  Constraint: A dummy argument, or a subobject thereof, shall not appear
              in a <specification-expr> except as the argument to one of
              the intrinsic functions BIT_SIZE, KIND, LEN, or the numeric
              inquiry functions (13.11.8).

[214:9+] Add a new note as follows:

  The restriction on dummy arguments in specification expressions is
  imposed primarily to facilitate optimization.  An example of usage
  that is not permitted is

       ELEMENTAL REAL FUNCTION F (A)
          REAL :: A
          INTEGER :: N
          REAL :: WORK_ARRAY (N)  ! Invalid
          ...
       END FUNCTION F

  An example of usage that is permitted is

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

[214:17-18] Delete sentence "For...expression."

[214:19-20] Delete note 12.36

[214:35-36] Delete sentence "For...expression."

[214:40-215:9] Delete note 12.38

--------------Some global items.

Index.  Make font size for index entries 10 pt like the rest of the
    document instead of 12 pt.

Change font for "FORTRAN 66" and "FORTRAN 77" to be consistently large "F"
    with "ORTRAN" in small capitals as in section 1.5.2 on pp 3-4.
    Changes are needed in the following lines:

    FORTRAN 66: 303:16, 303:20, 303:25, 303:27, 307:15

    FORTRAN 77: Contents at 1.5.2, 6:20, 6:24, 303:9, 303:13, 303:16, 303:20,
                303:21, 303:24, 307:15, index at "compatibility", index at 
                "FORTRAN 77 compatibility".

    (The heading for section 1.5.2 is ok on page 3.  However, my attempts
    to get the font size change into the table of contents entry for this
    section on pg i failed.  The index entries were also tricky, but they
    worked).

----------------- from interpretations passed in Jan 96.

interp 27

     1. In section 13.14.13, [232:19] in the description of the
        TARGET dummy argument add
          ". It shall have the same type, type parameters, and rank
              as POINTER"
        following
           "shall be a pointer or target"

     2.  Section 13.14.13, replace Case (ii) [232:25-27] and Case (iii)
         [232:28-30] with
         (Editor's note: I added commas after "otherwise" and "If POINTER
         is disassociated".  Also deleted "the" before "POINTER").


        "Case (ii):  If TARGET is present and is a scalar target, the
           result is true if TARGET is not a zero-sized storage
           sequence and the target associated with POINTER occupies
           the same storage units as TARGET.
           Otherwise, the result is false. If POINTER is
           disassociated, the result is false.

         Case (iii): If TARGET is present and is an array target, the result
           is true if the target associated with POINTER and TARGET
           have the same shape, are neither of size zero nor arrays whose
           elements are zero-sized storage sequences, and occupy the
           same storage units in array element order.  Otherwise,
           the result is false. If POINTER is disassociated, the
           result is false.

         Case (iv):  If TARGET is present and is a scalar pointer, the result
           is true if the target associated with POINTER and the
           target associated with TARGET are not zero-sized storage
           sequences and they occupy the same storage units.
           Otherwise, the result is false.
           If either POINTER or TARGET is disassociated, the result
           is false.

         Case (v):   If TARGET is present and is an array pointer, the result
           is true if the target associated with POINTER and the
           target associated with TARGET have the same shape, are
           neither of size zero nor arrays whose elements are zero-sized
           storage sequences, and occupy the same storage units in
           array element order.  Otherwise, the result is false.
           If either POINTER or TARGET is disassociated, the result
           is false. "

interp 81

     1. In section 12.4.1.6 [203:26-28], delete the first
        sentence of (1).

     2. In section 12.4.1.6 [203:34] after 2nd ',' in (c) insert
         " the dummy argument is a scalar object or an assumed-shape
           array,"

     3. In section 12.4.1.6 [204:17],
          change "pointer association status of A"
              to "allocation of B"

     4. In section 12.4.1.6 [204:20-21]
          change ", but would ... attribute."
           to ". If B were declared with the POINTER attribute,
               either of the statements
                 DEALLOCATE(A)
               and
                 DEALLOCATE(B)
               would be permitted, but not both."

     5. In section 12.4.1.6 [205:5-7], delete the first sentence
        of (2).

     6. In section 12.4.1.6 [205:14] after 2nd "," in (c) insert
        " the dummy argument is a scalar object or an assumed-shape
          array,"


interp 125


     1. In section 12.4.1.1 delete the last sentence of the 4th
        paragraph [200:30-32]

     2. In section 12.4.1.1, add to the end of the 7th paragraph
        [200:45]
        "If such a dummy argument is associated with a dummy argument
        with the TARGET attribute, whether any pointers associated
        with the original actual argument become associated with the
        dummy argument with the TARGET attribute is processor
        dependent."

     3. In section 12.4.1.2, 8th paragraph, [201:1]
        Change 'is either scalar or is an assumed-shape array'
            to 'is either a scalar or an assumed-shape array'

     4. In section 12.4.1.2 replace the 9th paragraph [201:8-10] by
        "If the dummy argument has the TARGET attribute and is an
         explicit-shape array or is an assumed-size array, and the
         corresponding actual argument has the TARGET attribute but is
         not an array section with a vector subscript

           (1) On invocation of the procedure, whether any pointers
               associated with the actual argument become associated
               with the corresponding dummy argument is processor
               dependent and

           (2) When execution of the procedure completes, the pointer
               association status of any pointer that is pointer
               associated with the dummy argument is processor
               dependent.

     5. In section C.9.5 [336:32]
   Change "and is scalar or assumed-shape"
       to "and is either a scalar or an assumed-shape array"


interp 148

     (As mentioned in email, the following text reflects some editorial
     changes from the exact text of the interpretation).

     1. [262:15+] In Section 13.14.86, before "Examples", insert the
        following paragraph:

         "The pseudorandom number generator used by RANDOM_NUMBER
          maintains a seed that is updated during the execution of
          RANDOM_NUMBER and that may be specified or returned by
          RANDOM_SEED.  Computation of the seed from argument PUT
          is performed in a processor-dependent manner.
          The value returned by GET need not be the same as the value
          specified by PUT in an immediately preceding reference to
          RANDOM_SEED.  For example, following execution of the
          statements

               CALL RANDOM_SEED(PUT=SEED1)
               CALL RANDOM_SEED(GET=SEED2)

          SEED2 need not equal SEED1.  When the values differ, the use
          of either value as the PUT argument in a subsequent call to
          RANDOM_SEED shall result in the same sequence of pseudorandom
          numbers being generated.  For example, after execution of
          the statements

               CALL RANDOM_SEED(PUT=SEED1)
               CALL RANDOM_SEED(GET=SEED2)
               CALL RANDOM_NUMBER(X1)
               CALL RANDOM_SEED(PUT=SEED2)
               CALL RANDOM_NUMBER(X2)

          X2 equals X1."


interp 187

      1. Delete the second sentence of 5.1.2.8 [57:18-19].

      2. Section 5.5.2.3 [70:22] (95-007r2)
          Change 'shall' to 'may'

      3. Section 5.5.2.3 [70:23] (95-007r2)
          Change 'attribute.'
          to 'attribute and the same type and type parameters.'


interp 201

      1. In section 13.14.95, the paragraph prefaced with
         "Result Value", [265:40-41]
          change "if the precision is not available"
              to "if the processor does not support a real data type
                  with a precision greater than or equal to P"

      2. In section 13.14.95, the paragraph prefaced with
         "Result Value", [265:41]
         change "if the exponent range is not available"
             to "if the processor does not support a real data type
                 with an exponent range greater than or equal to R"

      3. In section 13.14.95, the paragraph prefaced with
         "Result Value", [265:41]
          change "if neither is available"
              to "if neither is supported"


interp 203
      (Note, deleted the comma from the second edit; it didn't belong)

      1. In section 14.4, 2nd sentence  [281:28],
          Add "that is not an extended intrinsic operator"
         after "A defined operator"

      2. In section 14.5, 2nd sentence [281:33],
          Add "or replace the intrinsic derived type assignment
               operation" after "operations"


----------- Final adjustments

After all the above edits were done, some adjustments around tables and
notes (which are implemented as Frame tables) were made to improve page
breaks.  The automatic page breaking doesn't deal well with tables, so
they often need to be hand-tuned.  None of these adjustments involved
any changes to text.

I ran a script to edit the Frame Postscript prolog so that the
Postscript files should print without change on US letter and A4
paper.


-- 
Richard Maine
maine@altair.dfrc.nasa.gov

