15 February 2007 J3/07-142r2 To: J3 Sub ject: Comments on Annex C From: Van Snyder Date: 26 January 2007 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 Edits Edits refer to 07-007. Page and line numbers are displayed in the margin. Absent other instructions, a page and line number or line number range implies all of the indicated text is to be replaced by associated text, while a page and line number followed by + (-) indicates that associated text is to be inserted after (before) the indicated line. Remarks are noted in the margin, or appear between [ and ] in the text. [Editor: Insert "(13.7.54)" after "SELECTED REAL KIND" and delete the next sentence.] [Editor: Replace "may" by "might".] 523:20-23 523:23 The following illustrates how an abstract type can be used as the basis for a collection of related types, 524:29 and how a non-abstract member of that collection can be created by type extension. [Editor: Delete.] The actual drawing procedure draws a triangle in WINDOW with vertices at x coordinates OBJECT%POSITION(1)+OBJECT%VERTICES(1,:) and y coordinates OBJECT%POSITION(2)+OBJECT%VERTICES(2,:): [Editor: Delete ", Temp" and replace "pointers" by "pointer". ALLOCATE ( CURRENT % NEXT NODE ) ! Create new cell CURRENT % NEXT NODE % VALUE = K ! Assign value to new cell CURRENT => CURRENT % NEXT NODE ! CURRENT points to new end of list [Editor: Replace3 "may . . . name" by "cannot be referenced by way of a pointer".] [Editor: Delete "pseudo".] [Editor: Replace "pointing to" by "being associated with".] [Editor: Replace the comma by a semicolon.] [Editor: Delete "basically".] 525:1 525:7-9 525:34 526:2-5 532:4-5 532:41 535:33 535:35 536:34 [It isn't necessary to explain intrinsic and pointer assignment to illustrate pointers on the left side of an 537:1-37 assignment. Also, the more general case is "Pointers in variable-definition contexts."] C.4.4 Pointers in variable-definition contexts (7.2.1.3, 16.6.7)" The appearance of a pointer in a context that requires its value is a reference to its target. Similarly, where a pointer appears in a variable-definition context the variable that is defined is the target of the pointer. Executing the program fragment REAL, POINTER :: A REAL, TARGET :: B = 10.0 A => B A = 42.0 PRINT '(F4.1)', B produces "42.0" as output. Example 4: 539:14+ 15 February 2007 Page 1 of 4 15 February 2007 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 J3/07-142r2 The following FORALL statement illustrates declaring the index variable within the statement, which would otherwise require an integer variable of the same name to be accessible in the scope containing the statement. FORALL ( INTEGER :: COL = 1, SIZE(A,2) ) B(COL) = NORM2(A(:,COL)) [Editor: Delete "will".] [Editor: Insert ", stream" after "sequential" and replace "two" by "three" twice.] [Editor: Replace "will not" by "cannot".] 543:24 544:1-2 544:15 [Editor: Replace "If . . . positioned" by "If the next I/O operation on a file after a nonadvancing write 544:18-21 is a rewind, backspace, end file or close operation, the file is positioned".] [Editor: Replace "will contain" by "is assigned'.] [Editor: Replace "this" by "the".] [Editor: Replace "will contain" by "is'.] [Editor: Replace "has been" by "is".] [Editor: Replace "end-of-record" by "EOR" four times.] [Editor: Replace "is present" by "appears' and replace "required" by "requires".] [Editor: Replace "will be" by "is".] 544:24 544:25 544:26 544:28 544:28,29,36,38 544:30 544:31 [Editor: Replace "was successfully completed" by "completed successfully" and replace "will then be" 544:32 by "is".] [Editor: Replace "The IOSTAT. . . will be" by "If the IOSTAT= specifier appears, the specified variable 544:32-33 is".] [Editor: Replace "will be" by "is" and delete the other "will".] [Editor: Replace "continue" by "continues".] [Editor: Replace "has been found" by "condition is encountered".] 544:34 544:35 544:36 [Editor: Replace "The SIZE. . . will contain" by "If the SIZE= specifier appears, the specified variable 544:38 contains".] [Editor: Replace "this" by "the".] [Editor: Delete "will".] [Editor: Replace "Hopefully, the" by "The" and replace "will" by "should".] [Editor: Replace "will perform" by "performs".] [Editor: Replace "will process" by "processes".] 544:39 545:18 545:20-21 545:24 545:31 [Editor: Replace "user" by "program"; the standard is about programs and processors, not programmers 545:36 or users.] [Editor: Replace "When" by "If " and replace "is present" by "appears".] [Editor: Replace "was present" by "appears".] [Editor: Replace "will have to" by "can".] [Editor: Replace "got" by "encountered" and "will" by "can".] [Editor: Replace "got" by "encountered".] [Editor: Insert "in order" after "required".] 546:1 546:16 546:17 546:23 546:25 546:31 15 February 2007 Page 2 of 4 15 February 2007 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 J3/07-142r2 547:1 [Editor: Replace "this" by "the".] [Editor: Insert "unless the most recently previous operation on the unit was not a nonadvancing read 548:41 operation" after "empty)".] [Editor: Replace second "the" by "an advancing".] [Editor: Replace "will be" by "are".] [Editor: Replace "will" by "can be".] [Editor: Replace "shall be" by "are".] [Editor: Replace "shall translate" by "translates".] [Editor: Delete "(or file element)".] [Editor: Delete because it's about non-saved module variables disappearing, which they no longer do.] [Editor: Delete ", SAVE" because it's no longer needed.] 549:1 550:34 550:35 550:45 551:4 551:25 551:35-44 553:25 [Editor: Replace "This . . . application" by "An interface body specifies an explicit interface (12.4.2.1)".] 554:3-6 [Editor: Replace "and" by a comma and insert ", and other characteristics that require explicit interface" 554:4 after "arguments".] Because dummy argument names in an interface body for an external procedure are not required to be 554:24+ the same as in the procedure definition, different versions may be constructed for different applications using argument keywords appropriate to each application. [Editor: Insert "in the following example" before "is".] [Editor: Delete ", save" because it's no longer needed.] [Editor: Replace "modules" by "submodules".] [Editor: Insert "procedure" after "intrinsic".] not specified by this part of ISO/IEC 1539. [Editor: Delete "and Fortran 66" and "and 66".] [Editor: Delete "Fortran 66 and".] [Editor: Delete "Fortran 66/".] 560:14 560:18 563:8 563:24 563:38 566:21 566:24-25 566:33 [Editor: Insert a new paragraph:] 568:23+ If a nonpointer dummy argument has the TARGET attribute and the corresponding actual argument does not, any pointers that become associated with the dummy argument, and therefore with the actual argument, during execution of the procedure, become undefined when execution of the procedure completes. [Editor: Replace "intrinsics" by "intrinsic procedures".] [Editor: Move C.12.2 to [569:40+], after the changes noted below through page 582.] [Editor: Insert "or binding" after "specific procedure" thrice.] [Editor: Replace "specific procedures" by "interfaces of specific procedures or bindings".] 570:2 578:13ff 578:15-18 578:20 [Editor: Replace "and rank" by "rank, and whether the dummy argument has the pointer or allocatable 578:21 attribute".] [Editor: Insert "in 12.4.3.4.5" after "(2)" because the earlier reference to that subclause is on the previous 579:6 page and it's not clear to what "(2)" applies.] [Editor: Insert a new paragraph:] 582:23+ 15 February 2007 Page 3 of 4 15 February 2007 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 J3/07-142r2 If one dummy argument has the POINTER attribute and a corresponding argument in the other interface body has the ALLOCATABLE attribute the generic interface is not ambiguous. If one dummy argument has either the POINTER or ALLOCATABLE attribute and a corresponding argument in the other interface body has neither attribute, the generic interface might be ambiguous. [Editor: Delete "we construct" and replace "will record" by "records".] [Editor: Replace "will be" by "is" thrice.] 586:13 586:14,29,30 [Editor: Replace "Count . . . COUNT" by "It is necessary to count the down spins at the grid points, 586:25-26 so COUNT is corrected", then delete "writing".] [Editor: Replace "Our" by `The" and replace "these" by "the", delete "what . . . the", unquote "like- 586:28 minded nearest neighbors".]] [Editor: Replace "will be" by "are".] [Editor: Replace "will occur" by "occurs".] [Editor: Delete "by".] [Editor: Replace "we guarantee" by "guarantees".] [Editor: Move subclause C.13.10 to [569:41+] 586:31 586:31-32 586:33 586:34 591:1-4 15 February 2007 Page 4 of 4