J3/05-014r1 To: J3 From: Malcolm Cohen Subject: Cumulative edits for F2008 development Date: 2005/11/18 1. Introduction =============== This contains the combined edits from all passed papers at meetings 173 and 714, plus the "enhanced module" TR 19767, plus the editor's report thereof 05-169 (the latter changes some edits and deletes others). Some typos in the papers have been corrected in this list. Some comments appear. All edits appear in page and line number order. There will not be a combined document with them separated out into "feature" order; refer to the original papers for that information. 2. List of papers ================= >From meeting 169: TR 19767 (04-324). >From meeting 171: 05-169 (Editor's report on TR 19767). These are not separated out from TR 19767. >From meeting 173: 05-194r1, 05-196, 05-198r1, 05-199r2, 05-200r1, 05-201r2, 05-202r1, 05-204r2, 05-205r2, 05-210r2, 05-231r4, 05-232r1, 05-233r2, 05-234r2, 05-237r3, 05-240r4. >From meeting 174: 05-260r1, 05-264r3, 05-268r3, 05-273r3, 05-275r3, 05-278r2, 05-279. 3. List of edits ================ 05-234r2: [xiii] Introduction, the list of new Fortran 2008 features should include "The maximum rank of an array has been increased from seven to fifteen." 05-237r3: [xiii] Introduction, the list of new Fortran 2008 features should include "Performance enhancements: The DO CONCURRENT construct, which allows loop iterations to be executed in any order or potentially concurrently." 05-279: [xiii] Add something about non-null initial targets for data and procedure pointers to the introduction. 05-273r3: [xiii] Introduction, the list of new Fortran 2008 features should include "Performance enhancements: CONTIGUOUS attribute." TR 19767: [9:12+] 2.1 High level syntax, BNF R202 , after "<> " insert "<> ". TR 19767: [9:34+] 2.1, after BNF R1104 , insert new BNF rule "R1115a <> [ ] [ ] " 05-196: [10:24] 2.1 High level syntax, BNF for R210 , Delete first "" . 05-196: [10:29] 2.1 High level syntax, BNF for R1107 , Delete first "". TR 19767: [10:32+] 2.1, BNF for , add another alternative: "<> ". TR 19767: [11:41] 2.2 Program unit concepts, first paragraph, second sentence, after "module" insert ", a submodule". TR 19767: [11:43] 2.2, first paragraph, after the fourth sentence, (before "A block data ...") insert new sentence "A submodule is an extension of a module; it may contain the definitions of procedures declared in a module or another submodule." TR 19767: [11:45] 2.2, first paragraph, seventh sentence, between "module" and ", or another subprogram", insert ", a submodule". TR 19767: [11:47] 2.2, first paragraph, last sentence, between "module" and "but", insert "or submodule". TR 19767: [12:28] 2.2.3.2 Module procedure, second sentence, between "module" and "containing", insert "or submodule". TR 19767: [13:17+] After subclause 2.2.4 Module, insert new subclause: "2.2.5 Submodule A <> is a program unit that extends a module or another submodule. It may provide definitions (12.5) for procedures whose interfaces are declared (12.3.2.1) in an ancestor module or submodule. It may also contain declarations and definitions of other entities, which are accessible in descendant submodules. An entity declared in a submodule is not accessible by use association unless it is a module procedure whose interface is declared in the ancestor module. Submodules are further described in Section 11. Note 2.2a The scoping unit of a submodule accesses the scoping unit of its parent module or submodule by host association.". TR 19767: [14] 2.3.2 Statement order, Table 2.1, first row (second line), after "MODULE" insert ", SUBMODULE". TR 19767: [14] 2.3.2, Table 2.2, third column, heading, change "Module" to "Module or Submodule". TR 19767: [14] 2.3.2, Table 2.2, second footnote, - change "a module" to "a module or submodule" - change "the module" to "it". TR 19767: [14:2,4,6] 2.3.3 The END statement, - first sentence, after " insert "", and after "" insert ""; - third sentence, replace "and " by ", and ". - first sentence, replace "or " by ", , or ". TR 19767: [15:2] 2.3.3, last paragraph, after "", insert " <>..."), "The decimal precision of double precision real shall be at least 10, and its decimal exponent range shall be at least 37. It is recommended that the decimal precision of default real be at least 6, and that its decimal exponent range be at least 37." TR 19767: [46:10] 4.5.1.1 Accessibility, third paragraph, after "the definition" insert ", and within its descendant submodules". TR 19767: [46:10+7] 4.5.1.1, Note 4.18, after "defined", insert ", and within its descendant submodules". 05-273r3: [50:7+] 4.5.3 Components, BNF R441 , add new production "<> CONTIGUOUS" 05-279: [50:13-14] 4.5.3, Delete BNF R444 (it will reappear in a slightly different form in 4.5.3.4). 05-273r3: [50:31+] 4.5.3, after C443 (R440) A component shall not have both the ...", Add a new constraint: "C443a (R440) If the CONTIGUOUS attribute is specified, the component shall be an array with the POINTER attribute.". 05-279: [50:36-40] 4.5.3, the two constraints immediately before R445 , Move these constraints to 4.5.3.4 as detailed in the edit for [53:5+]. [53:5+] 4.5.3.4 Default initialization for components, after the first paragraph, insert a new paragraph "A pointer variable or component is <> with a target if the pointer is type compatible with the target, they have the same rank, and the values of corresponding nondeferred type parameters are specified by initialization expressions that have the same value. R446a <> => <> => R446b <> " Insert the moved C446 and C447 after the new R446b. After the moved constraints, insert new constraints: "C452a (R446a) The shall be data-pointer-initialization compatible with the . C452b (R446b) The shall be an initialization target." 05-279: [53:7+] 4.5.3.4 Default initialization for components, after the second paragraph, insert new paragraphs "A is an <> if it has the TARGET attribute, either has the SAVE attribute or is declared in the main program, does not have the ALLOCATABLE attribute, and every subscript, section subscript, substring starting point, and substring ending point in the variable is an initialization expression. If appears for a data pointer component, that component in any object of the type is initially associated with the target or becomes associated with the target as specified in 16.4.2.1.1. If appears in for a procedure pointer component, that component in any object of the type is initially associated with the target or becomes associated with the target as specified in 16.4.2.1.1.". 05-279: [54:1-] 4.5.3.4, at the very end, insert the following note "Note 4.36a A pointer component of a derived type may be default-initialized to have an initial target. {{ TYPE NODE INTEGER :: VALUE = 0 TYPE (NODE), POINTER :: NEXT_NODE => SENTINEL END TYPE TYPE(NODE), SAVE, TARGET :: SENTINEL }}". TR 19767: [55:10] 4.5.3.6 Component accessibility, last paragraph (immediately before Note 4.38), after "definition", insert ", and within its descendant submodules". TR 19767: [55:10+17] 4.5.3.6, Note 4.40, last sentence, after "only within the module" insert ", and within its descendant submodules". Also, delete the MODULE and END MODULE statements from the example code. TR 19767: [56:1--] 4.5.3.6, Note 4.41, last sentence, after "definition" insert ", and within its descendant submodules". 05-196: [56:4] 4.5.4 Type-bound procedures, BNF R448 , delete the first "". TR 19767: [58:8] 4.5.4 Type-bound procedures, last paragraph, last sentence, after "definition" insert ", and within its descendant submodules". TR 19767: [59:23-24] 4.5.5.2 When finalization occurs, second paragraph, second sentence, - after "defined in a module" insert " or submodule,"; - after "referencing the module" insert "or accessing the submodule". TR 19767: [60:4+5] 4.5.5.2, Note 4.48, second paragraph, - after the first "module" insert "or submodule"; - after the second "module" insert "or accessing the submodule". 05-201r2: [71:9-12] 5.1 Type declaration statements, BNF R502 , Insert a second alternative "<> TYPE ( )" giving "R502 <> <> TYPE ( ) <> TYPE ( ) <> CLASS ( ) <> CLASS ( * )" 05-273r3: [71:20+] 5.1, BNF T503 , add new production "<> CONTIGUOUS" 05-279: [72:16+] 5.1, BNF R506 , add a third production and a constraint "<> => C505a (R506) If an is specified, the shall be data-pointer-initialization compatible with it (\ref{D4:Default initialization for components}).". 05-273r3: [72:29+] 5.1, after C512 (R501) If the POINTER attribute is specified..., Add new constraint: "C512a (R501) An entity that has the CONTIGUOUS attribute shall be an array pointer or an assumed-shape array." 05-279: [73:15] NOTE FROM THE EDITOR: I DELETED THIS EDIT AS IT WAS BOTH UNNECESSARY AND WRONG. 05-279: [74:33-34] 5.1, paragraph beginning "If is => ...", replace the paragraph with "If appears, the initial association status of the object is disassociated. If appears, the object is initially associated with the target.". 05-201r2: [75:7] Within the first paragraph of 5.1.1.1 TYPE replace "a derived" by "an intrinsic or derived". 05-201r2: [75:8] Replace "Where ... specifier" by "In a that specifies a derived type". 05-273r3: [78:2-] After 5.1.2.4 BIND attribute for data entities, add a new subclause "5.1.2.4a CONTIGUOUS attribute The <> specifies that an entity is contiguous. An object is <> if it is not the real or imaginary part of an array of type complex, and is: (1) an object with the CONTIGUOUS attribute, (2) a scalar object, (3) a nonpointer array that is not assumed-shape, (4) an array allocated by an ALLOCATE statement, (5) an assumed-shape array that is argument associated with an array that is contiguous, (6) a pointer associated with a contiguous target, (7) an array with at most one element, or (8) an non-zero sized array section (6.2.2) with the following properties: (a) Its base object is contiguous. (b) It does not have a vector subscript. (c) The elements of the section, in array section order, are a subset of the base object elements that are consecutive in array element order. (d) If the array is of type character and a appears, the specifies all of the characters of the (6.1.1). (e) Only its final has nonzero rank. An object is not contiguous if it is an array subobject, and (1) the object has two or more elements, (2) the elements of the object in array element order are not consecutive in the elements of the base object, (3) the object is not of type character with length zero, and (4) the object is not of a derived type that has no ultimate components other than zero-sized arrays and characters with length zero. It is processor-dependent whether any other object is contiguous. Note 5.10a If a derived type has only one component that is not zero-sized, it is processor-dependent whether a structure component of a contiguous array of that type is contiguous. That is, the derived type might contain padding on some processors. [end Note] Note 5.10b The CONTIGUOUS attribute allows a processor to enable optimizations that depend on the memory layout of the object occupying a contiguous block of memory. Examples of CONTIGUOUS attribute specifications are: REAL, POINTER, CONTIGUOUS :: SPTR(:) REAL, CONTIGUOUS, DIMENSION(:,:) :: D [end Note]" 05-194r1: [78:13+] 5.1.2.5 DIMENSION attribute, BNF for R510 , after "<> ", insert "<> ". 05-234r2: [78:14] 5.1.2.5 DIMENSION attribute, first constraint C541 replace "seven" with "fifteen", making the whole constraint: "C541 (R510) The maximum rank is fifteen." 05-194r1: [78:14+8+] 5.1.2.5 DIMENSION attribute, Note 5.11, append a new line of example: "REAL, PARAMETER :: V(0:*) = [0.1, 1.1] ! Implied-shape array" 05-194r1: [80:35+] Insert a new subclause immediately before 5.1.2.6 EXTERNAL attribute: "5.1.2.5.5 Implied-shape array An <> is a named constant that takes its shape from the in its declaration. An implied-shape array is declared with an . R516a <> [ : ] * C544a (R516a) An implied-shape array shall be a named constant. The rank of an implied-shape array is the number of s in the . The extent of each dimension of an implied-shape array is the same as the extent of the corresponding dimension of the . The lower bound of each dimension is , if it appears, and 1 otherwise; the upper bound is one less than the sum of the lower bound and the extent." 05-210r2: [81:35] 5.1.2.7 INTENT attribute, fourth paragraph after C546 -- the one that begins "If no INTENT..." -- replace "associated actual argument" by "argument associated entity". TR 19767: [84:3] 5.1.2.12 PROTECTED attribute, second paragraph, first line, after "attribute," insert "or within any of its descendant submodules,". TR 19767: [84:14,16] 5.1.2.13 SAVE attribute, throughout second paragraph, change both occurrences of "module" to "module or submodule". 05-273r3: [87:12+] After 5.2.4 BIND statement, add a new subclause "5.2.4a CONTIGUOUS statement R523a is CONTIGUOUS [::] The CONTIGUOUS statement specifies the CONTIGUOUS attribute (5.1.2.4a) for a list of objects." 05-279: [88:26+] 5.2.5 DATA statement, BNF R532 , add a new penultimate production (after "<> ") "<> ". 05-279: [89:12] 5.2.5, fifth paragraph (beginning "The expanded sequence ..."), change "or " to ", initial data target, or ". 05-279: [89:14,16] 5.2.5, sixth and seventh paragraphs, insert "or " after "" twice. 05-279: [89:15] 5.2.5, sixth paragraph, second sentence, Change "The" to "If is , the". Change "pointer " to "data statement object". and append a new sentence to the paragraph "If is the corresponding shall be data-pointer-initialization compatible with the initial data target; the data statement object is initially associated with the target.". 05-200r1: [103:13+] 6 Use of data objects, BNF for R603 , after "<> " insert a new line "<> ". 05-200r1: [106:2+] Immediately before 6.1.3 Type parameter inquiry, insert new subclause: "6.1.2a Complex parts A <> is used to designate the real or imaginary part of a complex data object, independently of the other part. R614a <> % RE <> % IM C615a (R614a) The shall be of complex type. If is %RE it designates the real part of . If it is %IM it designates the imaginary part of . The type of a is real, and its kind and shape are those of the . Note 6.6a The following are examples of complex part designators: impedance%re !-- Same value as REAL(impedance) fft%im !-- Same value as AIMAG(fft) x%im = 0.0 !-- Sets the imaginary part of X to zero 05-260r1: [107:12+] Insert new BNF production for R617 : "<> " 05-260r1: [107:14] In the first constraint (C618) for R617 , Change "rank or" to "rank, the is a that is an array, or" 05-234r2: [108:6+] 6.2.2.2 Array element order, Table 6.1, In the second to bottom box: In the "Rank" column, change "7" to "15" In the Subscript bounds column, change the subscripts on the final j and k from "7" to "15" In the Subscript list column, change the subscript on the final s from "7" to "15" In the Subscript order value column, in the fifth line, change the subscripts on s and j from "7" to "15", and the subscript on d from "6" to "14"; in the sixth line, change the subscript on the first d from "5" to "13". In the bottom (Notes) box, in the last line, change "7" to "15". TR 19767: [113:18] 6.3.1.1 Allocation of allocatable variables, penultimate paragraph, third sentence replace "module or a subobject thereof" by "module or submodule, or a subobject thereof,". TR 19767: [115:9-10] 6.3.3.1 Deallocation of allocatable variables, third paragraph (the one after Note 6.23), throughout, replace both occurrences of "module" by "module or submodule". 05-278r2: [116:12] 6.3.3.1, near the end, paragraph beginning "When an intrinsic assignment ...", replace "" by "assigned variable". 05-279: [126:27-29] 7.1.7 Initialization expression, numbered list, replace the third item by "(3) A structure constructor where each corresponding to (a) An allocatable component is a reference to the intrinsic function NULL, (b) A pointer component is a reference to the intrinsic function NULL or an initialization target, and (c) Any other component is an initialization expression,". 05-278r2: [138:12-13] 7.4.1.1 General form, Replace BNF R734 and following constraint C715, by "R734 <> = R734a <> <> > C715 (R734a) The shall not be a whole assumed-size array. C715a (R734a) The shall be a reference to a function whose result is a pointer." 05-278r2: [138:15+] 7.4.1.1, at the end, add a new final paragraph: "The <> denoted by is the or the target of the result of . The result of the function reference shall be an associated pointer." 05-198r1 without 05-278r2: [138:18] 7.4.1.2 Intrinsic assignment statement, end of first paragraph, replace " shall not be polymorphic" by "if is polymorphic it shall be allocatable". 05-198r1 with 05-278r2: [138:18] 7.4.1.2, end of first paragraph, replace " shall not be polymorphic" by "if the assigned variable is polymorphic it shall be allocatable". 05-278r2 without 05-278r1: [138:18] 7.4.1.2, end of first paragraph, replace "" by "the assigned variable". 05-278r2: [138:19-21] 7.4.1.2, numbered list, replace " by "the assigned variable" all 4 times. 05-198r1: [139:1] 7.4.1.2 Intrinsic assignment statement, numbered list, beginning of item (3), replace "The" by "If is polymorphic it shall be type compatible with and have the same rank. Otherwise the". 05-278r2: [139:2+1-6] 7.4.1.2 Intrinsic assignment statement, Table 7.8, heading and "other character" lines, replace "" by "the assigned variable" both times. 05-278r2 without 05-198r1: [139:2+8-11] 7.4.1.2, Table 7.8, first line of the "derived type" row onwards, replace "" by "the assigned variable" both times. 05-198r1: [139:2+8-11] 7.4.1.2, Table 7.8, first line of the "derived type" row onwards, - delete "and kind parameters" and the semicolon. - then delete the last three lines of Table 7.8 (which reappear in the next edit).] 05-198r1 without 05-278r2: [139:3-] 7.4.1.2, numbered list, insert a fourth item: "(4) If is of derived type each length type parameter of shall have the same value as the corresponding type parameter of unless is allocatable and its corresponding type parameter is deferred, and each kind type parameter of shall have the same value as the corresponding type parameter of ." NOTE FROM THE EDITOR: This insertion should be at 2+0-, i.e. before the table, so that the table doesn't break up the list. 05-198r1 with 05-278r2: [139:3-] 7.4.1.2, numbered list, insert a fourth item: "(4) If the assigned variable is of derived type each length type parameter of the assigned variable shall have the same value as the corresponding type parameter of unless the assigned variable is allocatable and its corresponding type parameter is deferred, and each kind type parameter of the assigned variable shall have the same value as the corresponding type parameter of ." NOTE FROM THE EDITOR: This insertion should be at 2+0-. 05-278r2: [138:3-12] 7.4.1.2, the three paragraphs following table 7.8, replace "" by "the assigned variable" all 7 times. 05-278r2: [139:15-19] 7.4.1.3 Interpretation of intrinsic assignments, first paragraph, replace all occurrences of as follows: [139:15] replace "" by "" [139:16] replace both occurrences of "" by "the assigned variable" [139:17] replace "" by "" [139:18] replace the first "" by "the assigned variable", and the second "" by "assigned variable" [139:19] replace both occurrences of "" by "the assigned variable". 05-278r2: [139:21] 7.4.1.3, second paragraph, replace both occurrences of "" by "the assigned variable". 05-278r2: [139:22-23] 7.4.1.3, third paragraph, replace "" by "the assigned variable" all 3 times. 05-198r1 without 05-278r2: [139:23] 7.4.1.3, third paragraph ("If is an allocated..."), - replace "or" by a comma; - after "differ" insert ", or if the dynamic type of and differ". 05-198r1 with 05-278r2: [139:23] 7.4.1.3, third paragraph ("If is an allocated..."), - replace "or" by a comma; - after "differ" insert ", or if the dynamic type of the assigned variable and differ". 05-198r1: [139:25] 7.4.1.3 Interpretation of intrinsic assignments, third paragraph, delete the instance of "and" before "with each lower bound ...". 05-198r1: [139:26] 7.4.1.3 Interpretation of intrinsic assignments, third paragraph, after "LBOUND()" insert ", and with the same dynamic type as ". 05-278r2: [140:1] 7.4.1.3, paragraph following Note 7.35 (the note begins "For example, given the declaration ...") replace the first occurrence of "" by "" and the second occurrence by "the assigned variable". 05-278r2: [140:2-3] 7.4.1.3, first paragraph after Note 7.36 (the note begins "For example, in the character intrinsic ...") replace both occurrences of "" by "the assigned variable". 05-278r2: [140:4-5] 7.4.1.3, second paragraph after Note 7.36, replace both occurrences of "" by "the assigned variable". 05-278r2: [141:1-3] 7.4.1.3, first paragraph after Note 7.38, (the note begins "For example, the following program ...") replace both occurrences of "" by "the assigned variable". 05-278r2: [141:3+2-5] 7.4.1.3, Table 7.9 Numeric conversion and the assignment statement, In the heading replace "" by "the assigned variable", In the body replace "" by "" all 3 times. 05-278r2: [141:4-5] 7.4.1.3, first paragraph after Table 7.9, replace both occurrences of "" by "the assigned variable". 05-278r2: [141:6-11] 7.4.1.3, second paragraph after Table 7.9, replace "" by "the assigned variable" all 6 times. 05-278r2: [141:12-13] 7.4.1.3, third paragraph after Table 7.9, [141:12-13] Replace the first two occurrences of "" by "the assigned variable". [141:13] Replace the third occurrence of "" by "". 05-278r2: [141:14-23] 7.4.1.3, first paragraph after Note 7.39 and its numbered list, (the note begins "For nondefault character types ..." Replace "" by "the assigned variable" all 4 times. 05-278r2: [142:0+6] 7.4.1.3, Note 7.41 (begins "If an allocatable ...) replace "" by "the assigned variable". 05-278r2: [142:1-2] 7.4.1.3, last paragraph (immediately after Note 7.41) replace both occurrences of "" by "the assigned variable". 05-278r2: [142:27-30] 7.4.1.5 Interpretation of defined assignment statements, second paragraph, replace all 3 occurrences of "" by "the assigned variable". 05-273r3: [143:21] 7.4.2, Pointer assignment, in C720 After "If " change "is specified, ... otherwise" to "is not specified," 05-202r1: [144:5] 7.4.2, penultimate constraint (C727) After "external" insert ", internal", Making the constraint read: "C727 (R742) A shall be the name of an external, internal, module or dummy procedure, a specific intrinsic function listed in 13.6 and not marked with a bullet (O), or a procedure pointer." 05-273r3: [144:25+] 7.4.2.1 Data pointer assignment, after the fifth paragraph which reads "If has nondeferred ..." Add new paragraph "If has the CONTIGUOUS attribute, shall be contiguous." 05-273r3: [144:26] 7.4.2.1, penultimate paragraph, before "shall not be a disassociated", insert "shall be contiguous ([xref to the definition of contiguous]) or of rank one. It" 05-202r1: [144:36-38] After the first paragraph of 7.4.2.2 Procedure pointer assignment, insert a new paragraph "If is the name of an internal procedure the <> of becomes the innermost currently executing instance of the host procedure. Otherwise if has a host instance the host instance of becomes that instance. Otherwise has no host instance." 05-273r3: [145:9+19] 7.4.2.3 Examples, last note (Note 7.44), first sentence, Change "high-rank views of (parts of) rank-one objects" to "different-rank views of parts of an object" [145:9+20] 7.4.2.3, last note in subclause (Note 7.44), after first sentence, Insert new sentence "This requires that the object be either rank one or contiguous." 05-278r2: [147:19, 23] 7.4.3.2 Interpretation of masked array assignments, third paragraph after Note 7.46 (paragraph begins "If a nonelemental function reference ..."), Replace the first occurrence of "" by "" Replace the second occurrence of "" by "assigned variable,". 05-278r2: [147:24] 7.4.3.2, fourth paragraph after Note 7.46, replace "" by "". 05-278r2: [148:5] 7.4.3.2, near the end, paragraph beginning "When a ..." Replace "" by "the assigned variable". 05-278r2: [149:12+] 7.4.4.1 The FORALL construct, immediately after the last constraint C739, insert "C739a (R757) The in an shall be a .". 05-273r3: [161:19] 8.1.4.3 Attributes of associate names, Before "TARGET, or VOLATILE" insert "CONTIGUOUS,". 05-237r3: [164:3] 8.1.6 DO construct, first paragraph, second sentence, replace "The EXIT and CYCLE statements" with: "The EXIT statement, except in a DO CONCURRENT construct, and the CYCLE statement" 05-237r3: [164:6] 8.1.6 DO construct, second paragraph, second sentence, replace "In either case," with: "Except in the case of a DO CONCURRENT construct," 05-237r3: [164:8+] 8.1.6 DO construct, after the second paragraph, insert new paragraph: "A <> construct is a DO construct with a of [,] CONCURRENT ." 05-237r3: [165:15+] 8.1.6.1.1, Form of the block DO construct, R830 , add a new line at the end of R830 "<> [,] CONCURRENT " 05-237r3: [167:7+] 8.1.6.4.1 Loop initiation, before the last paragraph insert new paragraphs: "For a DO CONCURRENT construct, the values of the index variables for the iterations of the construct are determined by the rules for the index variables of the FORALL construct (7.4.4.2.1 and 7.4.4.2.2). The number of distinct index value combinations in the active combination of values is the iteration count for the construct. An in a DO CONCURRENT construct has a scope of the construct (16.3). It is a scalar variable that has the type and type parameters that it would have if it were the name of a variable in the scoping unit that includes the DO CONCURRENT, and this type shall be integer type; it has no other attributes." 05-237r3: [167:10] 8.1.6.4.2 The execution cycle, first sentence, replace "The <> of a DO construct consists of" with: "The <> of a DO construct that is not a DO CONCURRENT construct consists of" 05-237r3: [167:23+] 8.1.6.4.2 The execution cycle, append a new paragraph: "The range of a DO CONCURRENT construct is executed for all of the active combinations of the values. Each execution of the range is an <>. The executions may occur in any order." 05-237r3: [167:25] 8.1.6.4.3 CYCLE statement, first sentence, replace "Step (2) in the above execution cycle may be curtailed" with: "Execution of the range of the loop may be curtailed" 05-237r3: [167:29+] 8.1.6.4.3 CYCLE statement, after constraint C828, add a new constraint: "C828a (R843) A shall not appear within the range of a DO CONCURRENT construct if it belongs to a construct that contains the DO CONCURRENT construct." 05-237r3: [167:33] 8.1.6.4.3 CYCLE statement, penultimate paragraph, beginning of the first sentence, replace "Execution of a CYCLE statement causes" with: "Execution of a CYCLE statement that belongs to a DO construct that is not a DO CONCURRENT construct causes" 05-237r3: [167:34] 8.1.6.4.3 CYCLE statement, penultimate paragraph, after the first sentence, add a new sentence: "Execution of a CYCLE statement that belongs to a DO CONCURRENT construct curtails that iteration of the construct." 05-205r2: [168:4-10] 8.1.6.4.4 Loop termination, Delete the first two paragraphs and the syntax rules for EXIT. NOTE: EDIT CONFLICT 05-237r3: [168:7+] 8.1.6.4.4 Loop termination, after constraint C829, add a new constraint "C829a (R844) An shall not belong to a DO CONCURRENT construct, nor shall it appear within the range of a DO CONCURRENT construct if it belongs to a construct that contains that DO CONCURRENT construct." NOTE: EDIT CONFLICT 05-205r2: [168:11] 8.1.6.4.4 Loop termination, third textual paragraph, Change "The loop" to "A loop". NOTE: EDIT OVERLAP - edit from 05-237r3 takes precedence. 05-237r3: [168:11] 8.1.6.4.4 Loop termination, beginning of the sentence before the list of items, replace "The loop terminates" with: "For a DO construct that is not a DO CONCURRENT construct, the loop terminates" NOTE TO EDITOR: EDIT OVERLAP. 05-205r2: [168:16] 8.1.6.4.4 Loop termination, numbered list, item (3), change "outer DO construct" to "outer construct". 05-237r3: [168:23+] 8.1.6.4.4 Loop termination, append new paragraph: "For a DO CONCURRENT construct, the loop terminates, and the DO construct becomes inactive when all of the iterations have completed execution." 05-237r3: [168:24-] Between subclauses "8.1.6.4.4 Loop termination" and "8.1.6.5 Examples of DO constructs", insert a new subsection (containing 2 notes): "8.1.6.4a Restrictions on DO CONCURRENT constructs A statement in the loop range shall not cause a branch out of the construct. A variable that is referenced in an iteration shall either be previously defined during that iteration, or shall be defined or become undefined during any other iteration of the current execution of the construct. A variable that is defined or becomes undefined by more than one iteration of the current execution of the construct becomes undefined when the current execution of the construct terminates. A pointer that is referenced in an iteration either shall be previously pointer associated during that iteration, or shall not have its pointer association changed during any iteration. A pointer that has its pointer association changed in more than one iteration has a processor dependent association status when the construct terminates. An allocatable object that is allocated in more than one iteration shall be subsequently deallocated during the same iteration in which it was allocated. An object that is allocated or deallocated in only one iteration shall not be deallocated, allocated, referenced, or become undefined in a different iteration. An input/output statement shall not write data to a file record or position in one iteration and read from the same record or position in a different iteration of the same execution of the construct. Records written by output statements in the loop range to a sequential access file appear in the file in an indeterminate order. Procedures referenced in the loop range shall be PURE. If the IEEE_EXCEPTIONS intrinsic module is accessible, calls to the IEEE_GET_FLAG, IEEE_SET_HALTING_MODE, and IEEE_GET_HALTING_MODE subroutines shall not appear in the loop range. Note 8.15a The restrictions on referencing variables defined in an iteration of a DO CONCURRENT construct apply to any procedure invoked within the loop. [end Note] Note 8.15b The restrictions on the statements in the loop range of a DO CONCURRENT construct are designed to ensure there are no data dependencies between iterations of the loop. This permits code optimizations that might otherwise be difficult or impossible because they would depend on characteristics of the program not visible to the compiler. [end Note]" 05-237r3: [169:1--] 8.1.6.5 Examples of DO constructs, after Note 8.18, add a new note: "Note 8.18a The following example represents a case in which the user knows that the elements of the array IND form a permutation of the integers 1..N. The DO CONCURRENT construct will allow the compiler to generate vector gather/scatter code, unroll the loop, or parallelize the code for this loop, significantly improving performance. INTEGER :: A(N,N),IND(N) DO CONCURRENT (I=1:N, J=1:N) A(IND(I),IND(J)) = A(IND(I),IND(J)) + 1 END DO" 05-205r2: [169:1-] Immediately before 8.2 Branching, insert new subclause "8.1.7 EXIT statement The EXIT statement provides one way of terminating a construct. R844 <> EXIT [ ] C829 (R844) If an refers to a , it shall be within that construct; otherwise, it shall be within the range of at least one . An EXIT statement belongs to a particular construct. If the EXIT statement refers to a construct name, it belongs to that construct; otherwise, it belongs to the innermost DO construct in which it appears. When an EXIT statement that belongs to a DO construct is executed, it terminates the loop (8.1.6.4.4) and any active loops contained within the terminated loop. When an EXIT statement that belongs to a non-DO construct is executed, it terminates any active loops contained within that construct, and completes execution of that construct. 05-231r4: [170:22-24] 8.4 STOP Statement, Replace R850 and C834 with: "R850 <> <> C834 (R850) The shall be of default kind. C834a (R850) The shall be of default kind." 05-231r4: [170:26-27] 8.4 STOP Statement, First textual paragraph, delete the second sentence which reads "Leading zero digits ... are not significant." 05-231r4: [170:29+] 8.4 STOP statement, end of subclause, append new paragraph and note: "It is recommended that the is made available by formatted output to the processor-dependent external unit identified by the named constant ERROR_UNIT of the ISO_FORTRAN_ENV intrinsic module (Section 9.4). Note 8.21+ If the is an integer, it is recommended that the value also be used as the process exit status, if the operating system supports that concept. If the integer is used as the process exit status, the operating system might be able to interpret only values within a limited range, or only a limited portion of the integer value (for example, only the least-significant 8 bits)." 05-275r3: [221:15+] 10.1.1 FORMAT statement, R1002 , add a new production "<> ( [ , ] )" 05-275r3: [222:13+] 10.2 Form of a format item list, after R1004 , add a new rule "R1004a <> *()" 05-275r3: [223:9] 10.2.1 Edit descriptors, R1005 , Change "G . [ E ]" to "G [ . [ E ] ]" 05-275r3: [223:20] 10.2.1, Second constraint (C1006) after R1010 , Change "and F" to "F, and G" 05-275r3: [223:21+] 10.2.1, After the second constraint (C1006) after R1010 , Add a new constraint "C1006a (R1005) For the G edit descriptor, shall be specified if and only if is not zero." 05-275r3: [225:13-15] 10.3 Interaction between input/output list and format, last paragraph (before Note 10.6) Delete the sentence "However, if another ... processed (10.7.2)." 05-275r3: [225:15] 10.3, last paragraph (before Note 10.6), Change "Format control then" to "Otherwise, format control" 05-275r3: [225:20] 10.3, last paragraph (before Note 10.6), after the penultimate sentence (which ends "... specification is reused.") insert a new sentence: "If format control reverts to a parenthesis that is not the beginning of an , the file is positioned in a manner identical to the way it is positioned when a slash edit descriptor is processed (10.7.2)." [225:22-] 10.3, at the very end after Note 10.6, add a new note: "Note 10.6a The effect of an is as if its enclosed list were preceded by a very large repeat count. There is no file positioning implied by reversion. This may be used to write what is commonly called a comma separated value record. For example, WRITE( 10, '( "IARRAY =", *( I0, :, ","))') IARRAY produces a single record with a header and a comma separated list of integer values." 05-275r3: [227:13] 10.6.1 Numeric editing, numbered list, item (6) Change "and F editing," to "F, and G editing,". 05-275r3: [233:20] 10.6.4 Generalized editing, first paragraph, first sentence, Change "The G. and G. E" to "The G, G., and G. E". 05-275r3: [233:21] 10.6.4, first paragraph, second sentence, Change "These" to "When is nonzero, these". 05-275r3: [233:23] 10.6.4, first paragraph, append new sentences "When is zero the processor selects the field width. On input, shall not be zero." 05-275r3: [233:25] 10.6.4.1 Generalized numeric editing, only paragraph, only sentence, Change "G. and G. E" to "G, G., and G. E". 05-275r3: [233:29] 10.6.4.1.1 Generalized integer editing, only paragraph, only sentence, Append "When used to specify the output of integer data, the G0 edit descriptor follows the rules for the I0 edit descriptor.". 05-275r3: [234:1-] 10.6.4.1.2 Generalized real and complex editing, after the first paragraph, insert a new paragraph: "When used to specify the output of real or complex data, the G0 edit descriptor follows the rules for the ES. E edit descriptor. Reasonable processor-dependent values of , , and are used with each output value." 05-275r3: [234:1] 10.6.4.1.2, second paragraph, only sentence, After "output field" insert "for the G. and G. E edit descriptors". 05-275r3: [234:15] 10.6.4.2 Generalized logical editing, only paragraph, append sentence "When used to specify the output of logical data, the G0 edit descriptor follows the rules for the L1 edit descriptor.". 05-275r3: [234:18] 10.6.4.3 Generalized character editing, only paragraph, append sentence "When used to specify the output of character data, the G0 edit descriptor follows the rules for the A edit descriptor with no field width." TR 19767: [249:3] 11 Program units, first paragraph, second sentence, after "module", insert ", a submodule". TR 19767: [249:4] 11 Program units, second paragraph, first sentence, after "modules" insert ",submodules". 05-196: [250:14] 11.2 Modules, BNF R1107 "", Delete first "". TR 19767: [250:17+] 11.2 Modules, BNF R1108 , add another alternative "<> ". TR 19767: [251:8] 11.2.1 The USE statement and use association, first paragraph, append "A submodule shall not reference its ancestor module by use association, either directly or indirectly. Note 11.6a It is possible for submodules with different ancestor modules to access each others' ancestor modules by use association.". TR 19767: [253:2-] Immediately before 11.3 Block data program units, insert new subclause "11.2.2 Submodules A <> is a program unit that extends a module or another submodule. The program unit that it extends is its <>, and is specified by the in the . A submodule is a <> of its parent. An <> of a submodule is its parent or an ancestor of its parent. A <> of a module or submodule is one of its children or a descendant of one of its children. The <> is the ordered pair whose first element is the ancestor module name and whose second element is the submodule name. Note 11.6b A module and its submodules stand in a tree-like relationship one to another, with the module at the root. Therefore, a submodule has exactly one ancestor module and may optionally have one or more ancestor submodules. {end note} A submodule accesses the scoping unit of its parent by host association. A submodule may provide implementations for module procedures, each of which is declared by a module procedure interface body (12.3.2.1) within that submodule or one of its ancestors, and declarations and definitions of other entities that are accessible by host association in descendant submodules. R1115a <> [ ] [ ] R1115b <> SUBMODULE ( ) R1115c <> [ : ] R1115d <> END [ SUBMODULE [ ] ] C1114a (R1115a) An automatic object shall not appear in the of a submodule. C1114b (R1115a) A submodule shall not contain a \obs{or a }. C1114c (R1115a) An object with default initialization that is declared in the of a submodule shall have the ALLOCATABLE, POINTER, or SAVE attribute. C1114d (R1115c) The shall be the name of a nonintrinsic module; the shall be the name of a descendant of that module. C1114e (R1115a) If a is specified in the , it shall be identical to the specified in the .". 05-273r3: [256:28] 12.2.1.1 Characteristics of dummy data objects, Change "VALUE(...), ASYNCHRONOUS(...)," to "ASYNCHRONOUS(5.1.2.3), CONTIGUOUS(5.1.2.3a), VALUE(5.1.2.15)," 05-273r3: [257:3] 12.2.2 Characteristics of function results, After "whether it is a pointer," insert "whether it has the CONTIGUOUS attribute,". TR 19767: [257:13] 12.3 Procedure interface, first paragraph, last sentence, after "units" insert ", except that for a separate module procedure body ({ref to new 12.5.2.4}), the dummy argument names, binding label, and whether it is recursive shall be the same as in its corresponding module procedure interface body (12.3.2.1)". TR 19767: [259:20] 12.3.2.1 Interface block, penultimate constraint (C1210), after "allowed only in an " insert "that is not a module procedure interface body". TR 19767: [259:30+] 12.3.2.1, after third paragraph after the last constraint (C1211) (i.e. after "; otherwise, it is an external procedure.") insert new paragraph and constraints: "A <> is an interface body whose initial statement contains the keyword MODULE. It declares the <> for a separate module procedure ({ref new 12.5.2.4}). A separate module procedure is accessible by use association if and only if its interface body is declared in the specification part of a module and is public. If a corresponding ({ref new 12.5.2.4}) separate module procedure is not defined, the interface may be used to specify an explicit specific interface but the procedure shall not be used in any way. C1212b (R1227) A module procedure interface body shall not appear in an abstract interface block.". 05-279: [264:19] 12.3.2.3 Procedure declaration statement, BNF R1214 , replace BNF with "R1214 <> => R1214a <> <> R1214b <> ". 05-279: [264:30+] 12.3.2.3, After the fifth constraint after R1215 (the one that begins "If => appears ...") Insert new constraint "C1216a (R1214b) The shall be the name of an initialization target.". 05-279: [265:15-] 12.3.2.3, before the last non-note paragraph (begins "If => ...") insert new paragraph "A procedure is an initialization target if it is a nonelemental external or module procedure, or a specific intrinsic function listed in \ref{D13:Specific names for standard intrinsic functions} and not marked with a bullet ($\bullet$).". 05-279: [265:15-18] 13.2.3, last non-note paragraph, Replace with several paragraphs: "If => appears in a in a it specifies the initial association status of the corresponding procedure entity, and implies the SAVE attribute. The SAVE attribute may be confirmed by explicit use of the SAVE attribute in the , by inclusion of the procedure entity name in a SAVE statement (\ref{D5:SAVE statement}), or by the appearance of a SAVE statement without a in the same scoping unit. If => appears, the procedure entity is initially disassociated. If => appears, the procedure entity is initially associated with the target. If has an explicit interface, its characteristics shall be the same as except that may be pure even if is not pure and may be an elemental intrinsic procedure. If the characteristics of or are such that an explicit interface is required, both and shall have an explicit interface. If has an implicit interface and is explicitly typed or referenced as a function, shall be a function. If has an implicit interface and is referenced as a subroutine, shall be a subroutine. If and are functions, they shall have the same type; corresponding type parameters shall either both be deferred or both have the same value.". 05-202r1: [267:15-17] 12.4 Procedure reference, fifth constraint C1229 after BNF R1222 , Replace whole constraint ("A ... bullet(o).") by "C1229 (R1221) A shall be the name of an external, internal, module or dummy procedure, a specific intrinsic function listed in 13.6 and not marked with a bullet (o), or a procedure pointer." 05-202r1: [267:17+1-7] 12.4 Procedure reference, first note 12.16, Delete entire note ("Note 12.16 This standard does not allow..."). 05-210r2: [268:1-15] 12.4.1 Actual arguments, dummy arguments, and argument association, throughout first paragraph, use "correspond" in the appropriate form instead of "associate". In detail: - Replace "is associated with" by "corresponds to" at [268:5], [268:7-8], [268:9], and [268:10]. - Replace "be associated with" by "correspond to" at [268:13], [268:14], and [268:15]. 05-210r2: [268:15+] 12.4.1, after the first paragraph, add a new paragraph: "Except in references to intrinsic inquiry functions, if the dummy argument is not a pointer and the corresponding actual argument is a pointer, the actual argument shall be pointer associated with a target and the dummy argument becomes argument associated with that target. Otherwise the dummy argument becomes argument associated with the corresponding actual argument." 05-273r3: [269:15] 12.4.1.2 Actual arguments associated with dummy data objects, sixth normative paragraph, Before "If a dummy argument is allocatable" insert "If a dummy pointer has the CONTIGUOUS attribute, the actual argument shall have the CONTIGUOUS attribute." 05-210r2: [269:20-22] 12.4.1.2, Delete the paragraph that begins "Except in references to intrinsic inquiry functions...." 05-273r3: [270:5-6] 12.4.1.2, paragraph beginning "If the dummy argument has the TARGET attribute, does not have the VALUE attribute...", Replace "either a scalar or an assumed-shape array" with "either a scalar or an assumed-shape array that does not have the CONTIGUOUS attribute." 05-210r2: [270:38-39] 12.4.1.2, paragraph beginning "If a nonpointer dummy argument has INTENT(OUT)..." - replace "actual argument" by "argument associated entity" - replace "corresponding actual argument by "argument associated entity". 05-273r3: [271:8,11] 12.4.1.2, both constraints (C1232 and C1233) following Note 12.25 which begins "For more explanatory ...", After "shall be an assumed-shape array" insert "that does not have the CONTIGUOUS attribute". 05-202r1: [271:12+] 12.4.1.3 Actual arguments associated with dummy procedure entities, Insert a new first paragraph: "If the actual argument is the name of an internal subprogram, the host instance of the dummy argument is the innermost currently executing instance of the host of that internal subprogram. If the actual argument has a host instance the host instance of the dummy argument is that instance. Otherwise the dummy argument has no host instance." 05-202r1: [271:16] 12.4.1.3 Actual arguments associated with dummy procedure entities, second paragraph, first sentence, after "external" insert ", internal". 05-200r1: [273:1-2] 12.4.1.6 Restrictions on dummy arguments not present, item (5) in the second numbered list, change "component ... substring selector" to "subobject selector". TR 19767: [280:3+] 12.5.2.1 Function subprogram, BNF R1228 , append another alternative "<> MODULE". TR 19767: [280:7+] 12.5.2.1, between constraint C1242 and BNF R1229 , insert "C1242a (R1227) MODULE shall appear only within the or of a module subprogram or of an interface body that is declared in the scoping unit of a module or submodule. C1242b (R1227) If MODULE appears within the in a module subprogram, an accessible module procedure interface having the same name as the subprogram shall be declared in the module or submodule in which the subprogram is defined, or shall be declared in an ancestor of that program unit. C1242c (R1227) If MODULE appears within the in a module subprogram, the subprogram shall specify the same characteristics and dummy argument names as its corresponding ({ref to new 12.5.2.4}) module procedure interface body. C1242d (R1227) If MODULE appears within the in a module subprogram and a binding label is specified, it shall be the same as the binding label specified in the corresponding module procedure interface body. C1242e (R1227) If MODULE appears within the in a module subprogram, RECURSIVE shall appear if and only if RECURSIVE appears in the in the corresponding module procedure interface body.". 05-202r1: [282:35] 12.5.2.3 Instances of a subprogram, second paragraph, second sentence, replace "directly" with "by name". 05-202r1: [282:37] 12.5.2.3 Instances of a subprogram, second paragraph, append "If an internal procedure is invoked via a dummy procedure or procedure pointer, the internal procedure has access to the entities of the host instance of that dummy procedure or procedure pointer." TR 19767: [283:1-] Immediately before 12.5.2.4 ENTRY statement, insert new subclause "12.5.2.3a Separate module procedures A <> is a module procedure defined by a , by a whose initial statement contains the keyword MODULE, or by a whose initial statement contains the keyword MODULE. Its interface is declared by a module procedure interface body (12.3.2.1) in the of the module or submodule in which the procedure is defined, or in an ancestor module or submodule. R1234a <> MODULE PROCEDURE [ ] [ ] R1234b <> END [PROCEDURE []] C1251a (R1234a) The shall be the same as the name of a module procedure interface that is declared in the module or submodule in which the is defined, or is declared in an ancestor of that program unit and is accessible by host association from that ancestor. C1251b (R1234b) If a appears in the , it shall be identical to the in the MODULE PROCEDURE statement. A module procedure interface body and a subprogram that defines a separate module procedure <> if they have the same name, and the module procedure interface is declared in the same program unit as the subprogram or is declared in an ancestor of the program unit in which the procedure is defined and is accessible by host association from that ancestor. A module procedure interface body shall not correspond to more than one subprogram that defines a separate module procedure. Note 12.40a A separate module procedure can be accessed by use association if and only if its interface body is declared in the specification part of a module and is public. {end note} If a procedure is defined by a , its characteristics are specified by the corresponding module procedure interface body. If a separate module procedure is a function defined by a , the result variable name is determined by the FUNCTION statement in the module procedure interface body. Otherwise, the result variable name is determined by the FUNCTION statement in the module subprogram. TR 19767: [283:7] 12.5.2.4 ENTRY statement, second constraint (C1253), replace "" by "a that does not define a separate module procedure". TR 19767: [284:37] 12.5.2.6 CONTAINS statement, first paragraph, change first "module" to "module, submodule". 05-278r2: [286:31] 12.6 Pure procedures, constraint C1272, enumerated list, third item (begins "In a pure subprogram...") Replace "" by "assigned variable". 05-237r3: [287:7+] 12.6 Pure procedure, Note 12.44, first sentence, third line, replace "FORALL where" with "FORALL or a DO CONCURRENT construct, where" 05-237r3: [287:7+] 12.6 Pure procedure, Note 12.44, last sentence, replace "referenced in FORALL statements and constructs and within" with: "referenced in FORALL statements and constructs, DO CONCURRENT constructs, and within" 05-204r2: [294:25+] 13.5.2 Mathemetical functions, insert new line in list after ACOS: "ACOSH(X) Inverse hyperbolic cosine" 05-204r2: [294:26+] 13.5.2 Mathemetical functions, insert new line in list after ASIN: "ASINH(X) Inverse hyperbolic sine" 05-204r2: [294:27+] 13.5.2 Mathemetical functions, insert new line in list after ATAN: "ATANH(X) Inverse hyperbolic tangent" 05-268r3: [294:28+] 13.5.2, insert into list in alphabetical order "BESSEL_J0 (X) Bessel function of the first kind of order zero BESSEL_J1 (X) Bessel function of the first kind of order one BESSEL_JN (X,N) Bessel function of the first kind of order N BESSEL_Y0 (X) Bessel function of the second kind of order zero BESSEL_Y1 (X) Bessel function of the second kind of order one BESSEL_YN (X,N) Bessel function of the second kind of order N ERF (X) Error function ERFC (X) Complementary error function GAMMA (X) Gamma function HYPOT (X,Y) Euclidean distance function LOG_GAMMA (X) Logarithm of absolute value of gamma function" NOTE FROM THE EDITOR: THIS EDIT WAS DEFECTIVE - IT WAS MISSING ALL BUT THE FUNCTION NAMES. 05-264r3: [294:30+] 13.5.2, insert into list in alphabetical order "ERFC_SCALED (X) Exponentially-scaled complementary error function" 05-273r3: [296:15+] 13.5.8 Other inquiry functions, insert into list in order: "IS_CONTIGUOUS(A) Contiguity inquiry" 05-264r3: [297:7+] 13.5.12 Array reduction functions, insert into list in order: "NORM2 (X) $L_2$ norm of an array". 05-240r4: [298:5+] 13.5.18 System environment procedures, insert new line in list: "EXECUTE_COMMAND_LINE execute a command line" 05-204r2: [301:10] 13.7.3 ACOS(X), Argument paragraph, after "1" insert ", or of type complex". 05-204r2: [301:13] 13.7.3 ACOS(X), Result Value paragraph, - delete ", expressed in radians". - change "It lies" to "If it is real it is expressed in radians and lies". - append to paragraph "If it is complex the real part is expressed in radians and lies in the range $0 \leq$ REAL(ACOS(X)) $\leq \pi$.". 05-204r2: [301:14+] Before 13.7.4 ADJUSTL(STRING) insert new section: "13.7.3a ACOSH (X) Description.Inverse hyperbolic cosine function. Class. Elemental function. Argument. X shall be of type real or complex. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the inverse hyperbolic cosine function of X. If the result is complex the imaginary part is expressed in radians and lies in the range $0 \leq$ AIMAG(ACOSH(X)) $\leq \pi$. Example. ACOSH(1.5430806) has the value 1.0 (approximately)." 05-204r2: [304:14] 13.7.12 ASIN(X), Argument paragraph, after "1" insert ", or of type complex". 05-204r2: [304:17] 13.7.12 ASIN(X), Result Value paragraph, - delete ", expressed in radians". - change "It lies" to "If it is real it is expressed in radians and lies". - append to paragraph "If it is complex the real part is expressed in radians and lies in the range $-\frac\pi2 \leq$ REAL(ASIN(X)) $\leq \frac\pi2$." 05-204r2: [304:18+] Before 13.7.13 ASSOCIATED insert new section: "13.7.12a ASINH (X) Description.Inverse hyperbolic sine function. Class. Elemental function. Argument. X shall be of type real or complex. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the inverse hyperbolic sine function of X. If the result is complex the imaginary part is expressed in radians and lies in the range $-\frac\pi2 \leq$ AIMAG(ASINH(X)) $\leq \frac\pi2$. Example. ASINH(1.1752012) has the value 1.0 (approximately). 05-204r2: [305:31] 13.7.14 ATAN(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [305:34] 13.7.14 ATAN(X), Result Value paragraph, - delete ", expressed in radians". - change "It lies" to "If it is real it is expressed in radians and lies". - append to paragraph "If it is complex the real part is expressed in radians and lies in the range $-\frac\pi2 \leq$ REAL(ATAN(X)) $\leq \frac\pi2$." 05-204r2: [305:35+] Before 13.7.15 ATAN2 insert new section: "13.7.14a ATANH (X) Description.Inverse hyperbolic tangent function. Class. Elemental function. Argument. X shall be of type real or complex. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation to the inverse hyperbolic sine function of X. If the result is complex the imaginary part is expressed in radians and lies in the range $-\frac\pi2 \leq$ AIMAG(ATANH(X)) $\leq \frac\pi2$. Example. ATANH(0.76159416) has the value 1.0 (approximately)." 05-268r3: [306:13+] After 13.7.15, insert new subclauses "13.7.15a BESSEL_J0 (X) Description. Bessel function of the first kind of order zero. Class. Elemental function. Argument. X shall be of type real. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Bessel function of the first kind of order zero of X. Example. BESSEL_J0(1.0) has the value 0.765 (approximately). 13.7.15b BESSEL_J1 (X) Description. Bessel function of the first kind of order one. Class. Elemental function. Argument. X shall be of type real. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Bessel function of the first kind of order one of X. Example. BESSEL_J1(1.0) has the value 0.440 (approximately). 13.7.15c BESSEL_JN (N,X) Description. Bessel function of the first kind of order N. Class. Elemental function. Arguments. X shall be of type real. N shall be of type integer and nonnegative. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Bessel function of the first kind of order N of X. Example. BESSEL_JN(2, 1.0) has the value 0.115 (approximately). 13.7.15d BESSEL_Y0 (X) Description. Bessel function of the second kind of order zero. Class. Elemental function. Argument. X shall be of type real. Its value shall be greater than zero. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Bessel function of the second kind of order zero of X. Example. BESSEL_Y0(1.0) has the value 0.088 (approximately). 13.7.15e BESSEL_Y1 (X) Description. Bessel function of the second kind of order one. Class. Elemental function. Argument. X shall be of type real. Its value shall be greater than zero. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Bessel function of the second kind of order one of X. Example. BESSEL_Y1(1.0) has the value -0.781 (approximately). 13.7.15f BESSEL_YN (N,X) Description. Bessel function of the second kind of order N. Class. Elemental function. Arguments. X shall be of type real. Its value shall be greater than zero. N shall be of type integer and nonnegative. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Bessel function of the second kind of order N of X. Example. BESSEL_YN(2, 1.0) has the value -1.651 (approximately)." 05-204r2: [309:7] 13.7.24 COSH(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [309:9] 13.7.24 COSH(X), Result Value paragraph, append "If X is of type complex its imaginary part is regarded as a value in radians." 05-268r3: [315:24+] After 13.7.35 EPSILON(X), insert new subclauses: "13.7.35a ERF (X) Description. Error function. Class. Elemental function. Argument. X shall be of type real. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the error function of X, 2 divided by sqrt(pi) times the integral from 0 to x of exp( -t*t) dt. Example. ERF(1.0) has the value 0.843 (approximately). 13.7.35b ERFC (X) Description. Complementary error function. Class. Elemental function. Argument. X shall be of type real. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the complementary error function (that is, 1.0 - ERF(X)) of X. Example. ERFC(1.0) has the value 0.157 (approximately)." 05-264r3: [315:24+] After 13.7.3 EPSILON (X), insert new subclause "13.7.35c ERFC_SCALED (X) Description. Exponentially-scaled complementary error function. Class. Elemental function. Argument. X shall be of type real. Result Characteristics. Same as X. Result Value. The value of the result is a processor-dependent approximation to the exponentially-scaled complementary error function, $\exp(x^2) \frac2{\sqrt\pi} \int_x^\infty \exp(-t^2) \text{d}t$. Example. The value of ERFC_SCALED(20.0) is 0.02817434874 (approximately). Note 13.8a The complementary error function is asymptotic to $\exp(-x^2)/(x\sqrt\pi)$. As such it underflows for $x > \approx 9$ when using single-precision IEEE arithmetic. The exponentially-scaled complementary error function is asymptotic to $1/(x \sqrt\pi)$. As such it does not underflow until $x > \text{HUGE}(x)/\sqrt\pi$.". 05-240r4: [315:24+] 13.7 Specification of the standard intrinsic procedures, before 13.7.36 EXP(X), insert new subclause "13.7.35c EXECUTE_COMMAND_LINE(COMMAND [, WAIT, EXITSTAT, CMDSTAT, CMDMSG ]) Description. Execute the command line specified by the string COMMAND. If the processor supports command line execution, it shall support synchronous and may support asynchronous execution of the command line. Class. Subroutine. Arguments. COMMAND shall be of type default character and shall be a scalar. It is an INTENT(IN) argument. Its value is the command line to be executed. The interpretation is processor-dependent. WAIT (optional) shall be of type default logical and shall be a scalar. It is an INTENT(IN) argument. If WAIT is present with the value false, and the processor supports asynchronous execution of the external command, the command is executed asynchronously; otherwise it is executed synchronously. EXITSTAT (optional) shall be of type default integer and shall be a scalar. It is an INTENT(INOUT) argument. If the command is executed synchronously, it is assigned the value of the processor-dependent exit status. Otherwise, the value of EXITSTAT is unchanged. CMDSTAT (optional) shall be of type default integer and shall be a scalar. It is an INTENT(OUT) argument. It is assigned the value -1 if the processor does not support command line execution, a processor-dependent positive value if an error condition occurs, or the value -2 if no error condition occurs but WAIT is present with the value false and the processor does not support asynchronous execution. Otherwise it is assigned the value 0. CMDMSG (optional) shall be of type default character and shall be a scalar. It is an INTENT(INOUT) argument. If an error condition occurs, it is assigned a processor-dependent explanatory message. Otherwise, it is unchanged. When the command is executed synchronously, EXECUTE_COMMAND_LINE returns after the command line has completed execution. Otherwise, EXECUTE_COMMAND_LINE returns without waiting. If an error occurs and CMDSTAT is not present, execution of the program is terminated." 05-268r3: [317:10+] After 13.7.40 FRACTION(X), insert subclause "13.7.40a GAMMA (X) Description. Gamma function. Class. Elemental function. Argument. X shall be of type real. Its value shall not be a negative integer or zero. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the gamma function, the integral from 0 to infinity of exp( -t) t**( x - 1) dt. Example. GAMMA(1.0) has the value 1.000 (approximately)." 05-268r3: [319:20+] After 13.7.44 HUGE(X), insert subclause "13.7.44a HYPOT (X,Y) Description. Euclidean distance function Class. Elemental function. Arguments. X shall be of type real. Y shall be of type real with the same kind type parameter as X. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the Euclidean distance sqrt( x**2 + y**2 ), without undue overflow or underflow. Example. HYPOT(2.0, 1.0) has the value 2.236 (approximately)." 05-273r3: [325:7+] Immediately before 13.7.57 IS_IOSTAT_END(I), insert new subclause "13.7.56a IS_CONTIGUOUS(A) Description. Determine whether an object is contiguous (5.1.2.4a). Class. Inquiry function. Argument. A may be of any type. It shall be an assumed-shape array or an array pointer. If it is a pointer it shall be associated. Result Characteristics. Default logical scalar. Result Value. The result has the value true if A is contiguous, and false otherwise.". 05-199r2: [327:15-16] (LGE), [327:29-30] (LGT), [328:10-11] (LLE), [328:24-25] (LLT) Replace the argument descriptions of LGE, LGT, LLE and LLT with: "STRING_A shall be of type default character or type ASCII character. STRING_B shall be of type character with the same kind type parameter as STRING_A." 05-268r3: [329:21+] After 13.7.68a LOG10(X), insert new subclause "13.7. LOG_GAMMA (X) Description. Log gamma function. Class. Elemental function. Argument. X shall be of type real. Its value shall not be a negative integer or zero. Result Characteristics. Same as X. Result Value. The result has a value equal to a processor-dependent approximation of the natural logarithm of the absolute value of the gamma function of X. Example. LOG_GAMMA(3.0) has the value 0.693 (approximately)." NOTES FROM THE EDITOR: (1) Description should probably be "Logarithm of the absolute value of the gamma function". (2) LOG_GAMMA should precede LOG10, at [329:14+]. 05-264r3: [340:26+] After 13.7.87 NOT(I), insert new subclause "13.8.87a NORM2(X) Description. $L_2$ norm of an array. Class. Transformational function. Argument. X shall be of type real. It shall not be scalar. Result Characteristics. Scalar of the same type and kind type parameter value as X. Result value. The result has a value equal to a processor-dependent approximation to the $L_2$ norm of X if X is a rank-one array, the Frobenius norm of X if X is a rank-two array, and the generalized $L_2$ norm of X for higher-rank arrays. In all cases, this is the square root of the sum of the squares of all elements. Example. The value of NORM2( (/ 3.0, 4.0 /) ) is 5.0 (approximately). Note 13.16a It is recommended that the processor compute NORM2 in such a way that intermediate results do not overflow or underflow unless the final result would overflow or underflow, respectively.". NOTE FROM THE EDITOR: I HAVE DELETED THE DUPLICATE SPECIFICATION OF THE RESULT VALUE AS IT WAS NEEDLESSLY AND UNNECESSARILY REDUNDANT. 05-232r1: [350:12] 13.7.106 "SELECTED_REAL_KIND...", title, after "P, R" insert ", RADIX". 05-232r1: [350:13] 13.7.106, first paragraph "Description", - change "P digits and" to "P digits," - after "at least R" insert ", and a radix of RADIX". Making the whole description read "Returns a value of the kind type parameter of a real type with decimal precision of a least P digits, a decimal range of at least R, and a radix of RADIX." 05-232r1: [350:18+] 13.7.106, at the end of the "Arguments." paragraph, insert "RADIX (optional) shall be scalar and of type integer." 05-232r1: [350:21] 13.7.106, "Result Value" paragraph, after the first sentence "If ... value zero.", insert "If RADIX is absent, there is no requirement on the radix of the selected kind." 05-232r1: [350:21-29] 13.7.106, "Result Value" paragraph, replace the second sentence "The result has ... but not together." with the following two paragraphs, and make the remaining sentence ("If more ...") into a separate paragraph as well. "The result has a value equal to a value of the kind type parameter of a real type with decimal precision, as returned by the function PRECISION, of at least P digits, a decimal exponent range, as returned by the function RANGE, of at least R, and a radix, as returned by the function RADIX, of RADIX, if such a kind type parameter is available on the processor. Otherwise, the result is -1 if the processor supports a real type with radix RADIX and exponent range of at least R but not with precision of at least P, -2 if the processor supports a real type with radix RADIX and precision of at least P but not with exponent range of at least R, -3 if the processor supports a real type with radix RADIX but with neither precision of at least P nor exponent range of at least R, -4 if the processor supports a real type with radix RADIX and either precision of at least P or exponent range of at least R but not both together, and -5 if the processor supports no real type with radix RADIX." 05-204r2: [352:15] 13.7.111 SINH(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [352:17] 13.7.111 SINH(X), Result Value paragraph, append: "If X is of type complex its imaginary part is regarded as a value in radians." 05-234r2: [353:19] 13.7.144 SPREAD, "Arguments" paragraph, SOURCE argument, last sentence, change "less than 7" to "less than 15". 05-204r2: [355:16] 13.7.118 TAN(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [355:18-19] 13.7.118 TAN(X), Result Value paragraph - delete ", with X regarded as a value in radians" - append to paragraph "If X is of type real, it is regarded as a value in radians. If X is of type complex, its real part is regarded as a value in radians." 05-204r2: [355:24] 13.7.119 TANH(X), Argument paragraph, After "real" insert "or complex". 05-204r2: [355:26] 13.7.119 TANH(X), Result Value paragraph, append: "If X is of type complex its imaginary part is regarded as a value in radians." 05-232r1: [378:4] 14.10.17 "IEEE_SELECTED_REAL_KIND...", title, after "P, R" insert ", RADIX". 05-232r1: [378:5-6] 14.10.17, "Description" paragraph, - change "P digits and" to "P digits," - after "at least R" insert ", and a radix of RADIX". Making the whole description read "Returns a value of the kind type parameter of an IEEE real type with decimal precision of a least P digits, a decimal range of at least R, and a radix of RADIX." 05-232r1: [378:11+] 14.10.17, at the end of the "Arguments." paragraph, insert "RADIX (optional) shall be scalar and of type integer." 05-232r1: [378:13] 14.10.17, "Result Value" paragraph, insert new first sentences "If P or R is absent, the result value is the same as if it were present with the value zero. If RADIX is absent, there is no requirement on the radix of the selected kind." 05-232r1: [378:13-17] 14.10.17, "Result Value" paragraph, replace the first sentence "The result ... neither is available." with "The result has a value equal to a value of the kind type parameter of an IEEE real type with decimal precision, as returned by the function PRECISION, of at least P digits, a decimal exponent range, as returned by the function RANGE, of at least R, and a radix, as returned by the function RADIX, of RADIX, if such a kind type parameter is available on the processor. Otherwise, the result is -1 if the processor supports a real type with radix RADIX and exponent range of at least R but not with precision of at least P, -2 if the processor supports a real type with radix RADIX and precision of at least P but not with exponent range of at least R, -3 if the processor supports a real type with radix RADIX but with neither precision of at least P nor exponent range of at least R, -4 if the processor supports a real type with radix RADIX and either precision of at least P or exponent range of at least R but not both together, and -5 if the processor supports no real type with radix RADIX." TR 19767: [403:38+] 15.4.1 Binding labels for procedures, after second paragraph, insert "C1506 A procedure defined in a submodule shall not have a binding label unless its interface is declared in the ancestor module. TR 19767: [405:12+] 16 "Scope, association, and definition", first numbered list, insert new item "(4a) A submodule idenfitifer({ref new 11.2.2}), TR 19767: [405:19] 16.1 Scope of global identifiers, first paragraph, second sentence, before the first "program unit" insert "non-submodule". TR 19767: [405:22] 16.1, first paragraph, after second sentence (ends "same program."), insert new sentence "The submodule identifier of a submodule is a global identifier and shall not be the same as the submodule identifier of any other submodule." TR 19767: [406:1-] 16.1, between Note 6.2 and the last paragraph insert "Note 16.2a Submodule identifiers are global identifiers, but since they consist of a module name and a descendant submodule name, the name of a submodule can be the same as the name of another submodule so long as they do not have the same ancestor module." TR 19767: [406:6] 16.2 Scope of local identifiers, first numbered list, item (1), after "abstract interfaces" insert ", module procedure interfaces". TR 19767: [406:20] 16.2, paragraph before Note 16.3, after "(4.5.9)", insert ", and a separate module procedure shall have the same name as its corresponding module procedure interface body". 05-237r3: [409:15-410:4] 16.3 Statement and construct entities, replace "FORALL construct" with "FORALL or DO CONCURRENT construct" in the following eight locations: 409:15 409:24 409:28 409:42 409:43 410:1 410:2 410:4 05-237r3: [409:26] 16.3 Statement and construct entities, 3rd paragraph, 2nd sentence, replace "includes the FORALL" with "includes the FORALL statement or FORALL or DO CONCURRENT construct". {NOTE FROM THE EDITOR: Ugh. No J3 action required.} TR 19767: [411:2] 16.4.1.3 Host association, first paragraph, first sentence, after "module subprogram" insert ", a module procedure interface body". TR 19767: [411:3] 16.4.1.3, first paragraph, second sentence, after "interface body", insert "that is not a module procedure interface body". TR 19767: [411:4] 16.4.1.3, first paragraph, after the second sentence, insert new sentence "A submodule has access to the named entities of its parent by host association." TR 19767: [411:7] 16.4.1.3, first paragraph, last sentence, after "abstract interfaces", insert ", module procedure interfaces". TR 19767: [411:34] 16.4.1.3, paragraph after the numbered list, second sentence, change "or a subprogram," to "or a subprogram that does not define a separate module procedure,". TR 19767: [412:1+2] 16.4.1.3, Note 16.9, after "An interface body" insert "that is not a module procedure interface body" (before "accesses by host association..."). 05-279: [414:18+] 16.4.2.1.1 Events that cause pointers to become associated, end of the list, add a new item "(3) The pointer is an ultimate component of an object of a type for which default initialization is specified for the component, and the corresponding initializer is an initialization target, and" And copy the three subsidiary items of item (4) in 16.4.2.1.2 "Events that cause pointers to become disassociated" at [414:26-30] --- the first of which begins "a procedure is invoked ..." to here. 05-279: [414:25] 16.4.2.1.2 Events that cause pointers to become disassociated, within the fourth item (which begins "The pointer is an ultimate component ..."), Before "is specified" insert ", and the corresponding initializer is a reference to the intrinsic function NULL,". 05-202r1: [415:7+] 16.4.2.1.3 "Events that cause the pointer association status of pointers to become undefined", numbered list, after item (4) insert a new (top level) item "(4a) Execution of the host instance of a procedure pointer is completed by execution of a RETURN or END statement." TR 19767: [415:15+] 16.4.2.1.3, after numbered list item (5)(d), insert new level 2 item "(d+) Is in the scoping unit of a submodule if any scoping unit in that submodule or any of its descendant submodules is in execution,". 05-273r3: [416:24] 16.4.3.1 Storage sequence, numbered list, item (8), append sentence: "A pointer that has the CONTIGUOUS attribute occupies a storage unit that is different from that of a pointer that does not have the CONTIGUOUS attribute." 05-210r2: [418:16-17] Replace the first sentence of the second paragraph of 16.4.5 Establishing associations -- the one that begins "For argument association..." -- by "For argument association, if the dummy argument is not a pointer and the corresponding actual argument is a pointer, the pre-existing entity is the target of that pointer. Otherwise the pre-existing entity is the corresponding actual argument. In either case, the associating entity is the dummy argument." 05-202r1: [418:18] Within the second paragraph of 16.4.5 Establishing associations, before the third sentence -- the one that begins "If the host scoping unit...: -- insert a new sentence: "If an internal procedure is invoked via a dummy procedure or procedure pointer, the pre-existing entity that participates in the association is the one from the host instance." Then replace "If" by "Otherwise if". 05-278r2: [420:11-13] 16.5.5 Events that cause variables to become defined, numbered list, first item, Replace both occurrences of "variable that precedes the equals" by "assigned variable". TR 19767: [422:14-15] 16.5.6 Events that cause variables to become undefined, numbered list item (3)(c), - after "nonfinalizable local variables of a module" insert "or submodule"; - after "referencing the module" insert "or accessing the submodule". TR 19767: [422:16-17] 16.5.6, numbered list item (3)(d), - after "finalizable local variables of a module" insert "or submodule"; - after "referencing the module" insert "or accessing the submodule". 05-237r3: [423:18] 16.5.6 Events that cause variables to become undefined, item (15), replace "FORALL construct" with "FORALL or DO CONCURRENT construct". 05-237r3: [423:18+] 16.5.6, after item (15), add a new item "(15a) When a DO CONCURRENT construct terminates, a variable that is defined or becomes undefined during more than one iteration of the construct becomes undefined." 05-278r2: [423:28+2-3] 16.5.6 Events that cause variables to become undefined, near the end, in Note 16.19, Replace "variable that precedes the equals" by "assigned variable". 05-278r2: [425:26+] Annex A, Add the following glossary item: "<> (\ref{D7:General form}): The variable on the left side of an assignment statement, or the target of the pointer result of the function reference on the left side of an assignment statement." 05-278r2: [425:27] Annex A, Replace the glossary item for <>: "<> (\ref{D7:General form}): A statement that evaluates an expression and assigns its value to a variable." 05-205r2: [426:8] Annex A, definition of <>, delete the first "DO". 05-200r1: [428:32-33] Annex A, definition of <>, change "component ... substring selectors" to "subobject selectors". TR 19767: [432:11+] Annex A, after <> definition, insert new definition "<> (12.3.2.1) : The interface for a separate module procedure." 05-200r1: [434:26-27] Annex A, definition of <>, numbered list item (1), replace the whole item "Part ... component" with "subobject". NOTE TO EDITOR: Replace with "A subobject". TR 19767: [435:20+] Annex A, after <> definition, insert new definition "<> ({new refs 2.2.5, 11.2.2}) : A program unit that extends a module or another submodule.". ===END OF DOCUMENT===