J3/02-253 To: J3 Fortran Committee From: Brian T. Smith and Walt S. Brainerd Subject: Typos In The 007-R2 Draft Date: July 29, 2002 In recently reading the document, we found the following typos: Page/Line Item xiii/10 Change "Derived type enhancements" to "Derived-type enhancements" 20/33 Insert a period after "italic n". 31/21 Change "both the type and the particular" to "the type, type parameters, and the particular". Otherwise, it suggests that a value does not always have type parameters. (Cf. 33/15-17, and 34/7) 40/31 There is likely a double blank before "intrinsic". Remove one of them. 46/Note 4.21 Change "requires it to" to "requires it" in line 8 Change "dim" to "dim" (program font) in line 16 94/Note 5.37 Indent "INTERFACE" 3 spaces to line up with "END INTERFACE" 108/Table 6.1 Last line of the row labelled 7, last column: change d6 to d5. (d6 appears as the last item in the previous line.) 139 Table 7.7: in the first "Numeric" row, change the asterisk to a double asterisk. 155 NOTE 7.56: the convention is linear algebra texts is to call the section below or above the main diagonal the "strict lower or upper triangle". I recommend you use this term so that: insert "strict" before "lower" and "upper" in the second line of the text of the note. 156 NOTE 7.57 cont'd: insert "NOTE 7.56" after "in" in the first line of the note. 157/6-8 Replace "Construct" with "construct" three times to make it consistent with lines 9-10. 163/22 Insert after "selector", the text "is a variable and". Otherwise, definitions have to be provided for when an expression has INTENT, TARGET, ASYNCHRONOUS, or VOLATILE attributes, which of course is nonsense. 163/24-25 Delete as they are the same as C808, unless there is a situation that a variable cannot be defined but is something other than a variable with a vector subscript. 166 NOTE 8.15. Change "assumed here" to "implied here". The difference between this phrase and the one above is gratuitous, but by using a different phrase suggests some other subtle difference. 177/8 Change "INQUIRE" to "an INQUIRE statement". 179/9 A better phrase than "an integer number" is "an integral number" or "a whole number" 180/9-10 A clearer statement would be: "The initial value of a particular connection mode (9.4.1) is the value that would be implied by an initial OPEN statement without the corresponding keyword for the particular connection mode.". The problem I have is that there are several modes with keywords and which I was confused momentarily figuring out what corresponding keyword was being referenced. 181/8 Insert "mode" after "scale factor". 181/31-32 Replace "if a unit ..., the file is connected to the unit" with "the unit is connected to a file if and only if the file is connected to the unit.". The statement after the semicolon is symmetric in the replacement whereas as it stands now, the statement is not itself symmetric. 194 NOTE 9.34: fix the formatting of the continued comment beginning with the word "Allowed" Secondly, is the last line "Not allowed" the correct comment when A(1) = 11 and A(10) = 12? The lines 8-10 above, especially if the first sentence is applied before the second one, allows this situation. Either change the example or re-write lines 8-10 to say what you mean. 195 6 "allocatables" is an invented word. I recommend this be rewritten to "shall not have the pointer or allocatable attribute". Also, line 4 above should be rewritten in the same way. By the way, how are lines 5-7 adding anything beyond what lines 1-4 are saying. The only way I remember that a derived-type list item is not treated as a list of components is when it is subject to user-defined derived-type I/O. 196 25 Replace "identifier" by "ID = specifier". Otherwise, the sentence makes no sense because there are lots of identifiers around in an input/output operation. (even though "identifier" is not the official Fortran term). 199 27 What is "not incomplete"? Is there a third state other than a complete record and an incomplete record? If not, change "not incomplete" to "complete". 199 32 Change "and end-of-record" to "an end-of-record". 200 18 After "any", insert "appropriate". It does call the procedure for data transfer I/O not involving a derived-type object of the appropriate derived-type and the appropriate direction and type of the I/O. 201 17,33 Insert "," after "FORMATTED)". 202 1,17 Insert "," after "FORMATTED)". 205 14 Insert the item counter "(2)" at the beginning of the line. 209 20 Change "read" to "READ". 212 37-39 As is, this sentence does not make any sense. In line 39, change "performs" to "does not perform" or rewrite the sentence. Or is it the intention that the INQUIRE really DOES perform the WAIT operation; i.e., the INQUIRE has (also) the effect of a WAIT when used in these circumstances. If so, this should be expressed in a NOTE here. 219 5 This is a definition; make the font of "a recursive input/output statement" bold face text. 227 7 The use of normal font for the letter a and f here is confusing. I would recommend program font or something else be used here and elsewhere the hex digits a through f are referenced. 227 34 Delete the second "of" or insert after it "the input item". 228 7 After "field", insert ", excluding the exponent, ". 231 231 The pigeon English represented by "for A input" is inappropriate for a standard such as this. Proper English is much longer but should be used. Replace "for A input" with "for an A edit descriptor corresponding to an input item". A similar form of expression is used on the next page, page 232, line 1. 232 26 Changed "rounding value" to "rounded value". 233 There are two tables on this page which are unlabelled. The first uses a different symbol - (minus) for the minus sign in the first column and the second column. The same symbol, the long dash (or mathematical minus) should be used (also the symbol - in line 1). Secondly, the first table uses the symbol r which is italic and is supposedly defined in the next table (not italic r) with no text to introduce what the table is doing. I assume it is defining r and so I suggest the following fix; replace "where b is blank ... positive." with "where b (italic) is a blank, n (italic) is 4 for Gw.d and e+2 for Gw.dEe, w - (long dash) n shall be positive, and r (italic) is defined for each I/O rounding mode as follows:". 239 2 After "end of record", insert ",". 247 13 Change "end-program-stmt" to italic font. 247 23 Change "program-unit" to text font. (Cf. line 2 on this page.) 248 25 After "SAVE attribute", insert "explicitly". I am not sure what is intended here. Because it is a constraint, it suggests the "shall" is a requirement that the SAVE attribute be specified in the module. However, it may have been intended that the component have the SAVE attribute implicitly like the use of DATA initialization in some contexts. If this is not the intent, then either make the change suggested or make it even less ambiguous by replacing "the object shall have the SAVE attribute" with "the object shall be specified in the module with the SAVE attribute". 249 7 I am not sure what "the (5.2.1)" is supposed to be. The likely intention is accomplished by deleting ", the". 250 21 Insert "that" before "the entity". It makes it so much easier to read and parse. 256 20 Make this line italic (syntax) font. 256 24 Add a space before "If" 256 30 Fix the >, < symbols. 257 20 Change "bodyname!interface body" to "interface-body" in italics. 266 13 Insert "(" before 4.6.1.6). 266 14,17 Insert a hyphen between "passed" and "object" as in line 16. 473 11 Change comma to semicolon. Other more involved typographical problems that I have with the current document is the use of hyphenation, the use of commas for if-then English statements, the use of the word "only", and the punctuation around displayed lists. My issue is that in all four cases, the structure or forms used are inconsistent throughout the document. In many cases, the structures and forms are a matter of taste and style; however, whatever style is picked (and of course I have a preference), it should be applied as consistently as possible throughout the text. (Of course, the reason is that this is indeed a standards document and is read by many who are not familiar with the variety of nearly equivalent ways to form an English sentence and often conclude that the differences have a significance, which in most cases are not the case. For some cases, there is actually possible ambiguity in interpretation of the sentence so that by making them all the same structure and form, you reduce the number of clarifications and interpretations requested for the standard.) Hyphenation: Page/Line Item xiii, 10 derived-type as an adjective, hyphenated or not. In this line, it is not, but many other places it is (eg. page 41, line 20) 83 Line 1 of NOTE 5.16; change "derived type" to "derived-type". xiii, 21 deferred type as an adjective, hyphenated or not. In this line, it is not, but it plays the same role in the sentence as derived-type does in the previous example. Please be consistent -- the correct usage is to hyphenate an adjective- noun pair when used as an adjective to qualify another noun. 200 16 Change "derived type" to "derived-type". Note the inconsistency with the use in line line 18 and other places in the section. If-then English statement: The previous standard used the following convention: if the sentence began or used an if-then English construct, either the "then: was present and no comma was used to separate the "if clause" from the "then statement", or no "then" was used and a comma was used to separate the "if clause" from the "then statement (with "then" not appearing explicitly). Mostly, this convention is followed in the current draft but occasionally it is not. For example, consider the following lines: Page/Line Item 77/17 Insert "," after "array". 81/37 Insert "," after "stmt". 81/39 Insert "," after "apply". 125/33 Insert "then" after ")" instead of "," to avoid confusion with the role of the other commas following in the sentence. 208/17 Insert "," after "access". 217/22,41 After "occur", insert "then:". 257/22 Insert a comma after "unit". 267/32 Insert after "subscript" the word "then:" 268/1 Insert after "subscript" the word "then:" Punctuation For Displayed Lists (compared with page 4, line 37): Page/Line Item 11, 50 13, 9-13 Sorry: there are many more but ran out of time to complete. The Use of "only": Consider the following two sentences, compliments of JLW: "Some people only dream of flying." "Some people dream only of flying." There are some occurrences of the former (actually it is worse, because most of them also involve a split verb) when the latter is meant. Here is where we think they need fixing. 53:NOTE 4.41 (cf NOTE 4.40) 59:NOTE 4.54 82:NOTE 5.14 134:3 232:NOTE 10.16 274:8,18 275:11 355:NOTE 14.2:5 370:7+ 424:11 441:9 451:3 Other Technical Issues: This is a list of issues that we found when reading the document but could not resolve completely. They are listed here in case there are real problems that the committee would like to think about before the document goes out for public review. Page Line Comment 17 13-14 What is a subobject of a constant considered to be? I think it should say that it is an expression which may or may not be a constant expression, depending on whether the selector is a constant or not. Or should it be an initialization expression? There appears to be an issues here, including 128:27 which says that a subobject of a constant is an initialization expression, presumably allowing string(n:n), where n is a variable. For example: character(*), parameter :: string = 'abcdefg' type point real x, y end type type(point), parameter :: origin = point(0.0,0.0) We believe origin%x is a constant expression whereas string(I:J) is is a non-constant expression when I and J are variables, which at least 128:27 thinks is an initialization expression. The text should say what it is (if it is not stated someplace or not implied) or as a note if it is implied by the syntax rules and appropriate definitions. 33 18 Is the reference 4.5.1.5 correct? Section 4.5.1.5 seems to have nothing to do with a subroutine and generic interface with the generic specifier "ASSIGNMENT(=)". Can a type bound proc redefine assignment? If so, maybe that is why the reference is here. (We just don't know.) 43 14-16 This appears wrong as it appears to be making the assumption that a subobject of a constant is a constant. For example, suppose NAME is a named constant array and I is a type-param-name and consider name(I:I) as a type-param-value in a data-component-def-stmt somewhere. This is allowed but it is a surprise and bizarre. It is possibly based on the misunderstanding (a very "slippery slope") that a subobject of a constant is a constant. 65 20 The concept of a type that is "compatible" with intrinsic assignment seems to mixing up this concept (or confusing me at least) with the concept "type conformance in intrinsic assignment". You have defined "compatible types" in the polymorphic sense but this is not that concept here. The text of Section 7 refers to the concept of type conformance, which I believe is the correct term. Therefore, change "compatible with intrinsic assignment to" to "in intrinsic assignment type conformance with". (Also, compare with p. 90, lines 29-32 where the word compatible is used where conformance should probably be used.) 96 Section 5.4 Either as a note (because you think it is implied somehow or stated someplace but where) or as a forgotten but intended restriction, you should state that a named data object cannot be in the same namelist group more than once. The issue is not clear (unless it is stated someplace that I cannot find) because the list is like an I/O list for which you can repeat items. On the other hand, it is like a declaration (because it appears in the specification part) where the assumption is that a named object is not declared twice. I recommend that you add the following sentence (or a note here) after "group" on line 18, page 96: "A named data object must not be in in the same namelist group more than once." This may have been the discussion of an interp that allows repeats here, and if so, should be stated as a NOTE. 97 33 Insert "sequenced" before "derived type". This certainly helps comprehend what this restriction is saying but it does not have the intended meaning if constraint C584 is not part of the interpretation. It is thus redundant, but "sequenced" is a very helpful adjective in this sentence. 109 19/21 Last sentence: this is only two of other prohibited appearances of a many-one array section in a context in which the section can become defined (for example, one other way is when many-one array section is an actual argument corresponding to a dummy argument that has intent(INOUT) or intent(OUT), or a dummy argument that is defined, or as an internal file, and so on). I recommended that the sentence be modified as follows: "A many-one array section shall not appear in many contexts in which the many-one array section can be defined, such as on the left of an equals sign in an assignment statement, as in an input item in a READ statement, or as an actual argument associated with a dummy argument that can become defined or undefined.". 113 NOTE 6.19 appears out of place because it explains the text on lines 1-3 of page 116 in a different section. I recommend it be located in Section 6.3.3.1 after the quoted text. 126 4-6 This list is not complete. What about other places which do not seem to be covered such as in an item in the I/O list of a READ statement, as the only primary which is an item in the I/O list of a PRINT or WRITE statement, and as an actual argument corresponding to a non-pointer dummy argument (there are probably lots more places). 128 NOTE 7.9: where is the prohibition against recursion for a specification function? It does not appear in the above. If it has been left out, then reinstate it here. If it is somewhere else, then have the note refer where the restriction is stated. 191 20, 24,29 "Temporarily" normally means "time" like 5 minutes but is not defined anywhere. The intention is "during the data transfer". Let's get rid of all uses of temporarily and use the phrase "during the particular data transfer only". Other Technical Issues To Think About: Page Line Comment 17 4-7 This seems to be a change in what a local variable is? 33 1-4 How is passing a value via an assumed-type parameter different than argument association? 86 NOTE 5.23 What does "starts from" mean? 93 1-5 What is the difference between the name of a procedure pointer and a proc-entity-name? 96 Section 5.4 Can a named data object appear more than once in a NAMELIST group, either in the same statement or in different statements with the same namelist group name? 105 9-11 Why the second sentence of this constraint? 105 15-18 Why is this distinction necessary? See also NOTE 6.4 114 26-27 How is it possible to do this? With polymorphic objects somehow or is there some direct way? 115 9-11 How is it possible to do this? With polymorphic objects somehow or is there some direct way? 116 16 Why does this not include a pointer subobject? Maybe because a pointer have created an object that is also a target and automatic deallocation may not be expected or desirable? Can an allocated object be a target in which case the same situation can occur. 119 24 What is a type-param-name not a designator? 146 6-7 Why is it not allowed to be an internal procedure? 146 8 Why is it not allowed to be a user-defined elemental procedure? 185 7-8 The default of "UNFORMATTED" for stream access seems wrong to me. Most stream I/O I am aware of is formatted I/O. 191 16 What is a "storage sequence affector"? It is not in the index and not in the glossary. 195 13-14 Why is I/O restricted to default character internal files? 201 31 Why is "iomsg" INTENT(INOUT)? Why is it not always OUT? 35-44 Why no v_list argument? Page 203, lines 14-17 seems to say it is always or may be needed. 204 25 Why is asynchronous user-defined derived-type prohibited? 212 37-39 As is, this sentence does not make any sense. In line 39, change "performs" to "does not perform" or rewrite the sentence. 213 1-4 This does not make sense either. NOTE 9.61 seems to try a justify what is said but I do not understand this. 216 19-22 Why? This restriction does seem appropriate. 222 6-8 As stated, this prevents WRITE(*,'(' // a(1) ')') i but I think it is trying to prohibit write(*,b(1)) i where b(1) is an incomplete format specification (because the writer assumes the format is completed in b(2)). 224 17 Should "default" be inserted in front of "characters"? ! Annex C: many parts seem to have not been updated since the last standard. Examples are C.8.2 and C.9.3. For example, in 455:33, independent compilation is not new in this standard. Comparisons to F77 instead of to F95 seem inappropriate.