J3/02-247 Date: 2002 July 26 To: J3 From: Walt Brainerd and Brian Smith Subject: Derived-type parameter declarations While attempting to understand declarations of derived-type parameters, the following difficulties appeared: 1) That a d-t parameter is implicitly integer (46:3 and NOTE 4.21) is contrary to the expectations of anybody that has used Fortran. That different implicit typing rules apply to a dummy argument of a procedure and a d-t parameter is a really big surprise. 2) The explanation of whether a d-t parameter is KIND or NONKIND is very nearly unintelligible. Anything that takes this kind of explanation must be seriously flawed. 3) That an explicit declaration of a d-t parameter is required in some unusual circumstances is also very strange. 4) If d-t parameters are allowed to be some other data type (character, logical) in the future, there would be no rationale for them being integer by default. 5) What dialect of English has sentences that end with "requires it to" (Note 4.21)? The components of a d-t all must be declared explicitly. We think the parameters should be declared explicitly also. Proposal: 42:9:R426 <> INTEGER [ ] , :: 42:12+ Add another constraint after C419 C419+ (R426) Each in the in a shall appear as a in a in that . 46:3-4 Delete 2nd and 3rd sentences of the paragraph 46:7-10 Delete "The KIND attribute ... is allowed." 46:14-15 Delete 46:NOTE 4.21 Delete 1st paragraph, 1st example, and 2nd paragraph Replace the next sentence with "The following example uses derived-type parameters." In the last paragraph, delete "explicitly," and replace "even though ... here. This would allow" with "allowing" 47:1-4 Delete 47:NOTE 4.22 Delete 48:NOTE 4.25 Add line as second line of example INTEGER, NONKIND :: NAME_LEN ========================================================= Note: "derived-type parameter" does not appear in Annex A.