J3/03-186 To: J3 From: Malcolm Cohen Subject: Further wording improvements within 4.5 and without Date: 3rd April 2003 1. Introduction Further wording improvements are possible. References in the edits to pages within subclause 4.5 are to 03-166. 2. Discussion - wording improvement We could have some examples of type parameter order and component order. Edits for nontrivial (i.e. using type extension) examples are below. These examples occur before type extension is discussed, but are simple enough that they are hopefully more illuminating than confusing. The subclause on pointer components is redundant gibberish, notable not only for what it repeats from other sections and the syntax, but also for what it fails to mention. Even what is there is misleading (possibly wrong). It ought to be completely replaced! The subclause on default initialisation fails to specify what is going on with pointer components adequately. 3. Discussion - technical nonsense 16.4.2.1.2 is ungrammatical and incorrect. The disjunction is in the wrong place, 4(c) specifies an impossible case, and it fails to correctly specify what happens for passing allocatable/pointer objects to nonallocatable nonpointer INTENT(OUT) dummies (we are supposed to get default init here, but the current text fails to do this - which would be an incompatibility with F95 for a start!). The easiest way to fix this, with the least duplication of predicates (some is always going to be necessary) is to delete item 5 and fix item 4 to cover the item 5 case correctly as well as the above-mentioned non-covered case. (The alternative way would be to add the contents of 4a with modifications to 5. But this results in longer more complicated text.) 4. Edits to 02-007r3/03-166 [46:7+] Insert new note "Note 4.25a Given TYPE :: t1(k1,k2) INTEGER,KIND :: k1,k2 REAL(k1) a(k2) END TYPE TYPE,EXTENDS(t1) :: t2(k3) INTEGER,KIND :: k3 LOGICAL(k3) flag END TYPE the type parameter order for type T1 is K1 then K2, and the type parameter order for type T2 is K1 then K2 then K3." {Add a nontrivial example showing type parameter order.} [48:3] After "pointer" insert "(2.4.6)". {Useful cross-reference for the first mention of pointers in this chapter.} [48:3-8] Delete "Pointers have ... associated.". {Stuff repeated here from 2.4.6 and the syntax rules. The default initialisation stuff does not belong here and is misleading - it fails to mention anything other than an "initial" status (default init does not just affect "initial" status) and fails to give a cross-reference to ch16 where it lays out the rules for pointers being affected at runtime by default init.} [48:3-8] Append to paragraph "A pointer component may be a data pointer or a procedure pointer." {If we're going to have introductory waffle, let's mention something useful.} [49:0+3] Delete "=> NULL()". {This is irrelevant, distracting, and not explained in this example. It is explained and exampled properly in the default init subclause.} [49:13] After "polymorphic" insert "(5.1.1.8)". {A useful forward reference.} [49:16] Delete the reference "(4.5.3.2)". {Default init should be explained under default init, not under pointer comps!} [50:1-] Insert "If appears for a pointer component, that component in any object of the type has an initial association status of disassociated (16.4.2.1) or becomes disassociated as specified in 16.4.2.1.2." {This is where the rules are.} [51:1-] Move Note 4.32 to here. [51:8+] Insert new note "Note 4.36a Given the same type definitions as in note 4.25a, the component order of type T1 is just A (there is only one component), and the component order of type T2 is A then FLAG. The parent component (T1) does not participate in the component order." {Insert nontrivial example of component ordering.} [52:3,6,7] Change "" to "", thrice. [54:3] Change "" to "", once. {Better name for this statement.} [404:17] Change "a nonpointer nonallocatable" to "an". [404:20] Insert "nonpointer nonallocatable" before "dummy". [404:21] Insert "nonpointer nonallocatable" before "local". [404:24-25] Delete. {Fix technical nonsense.} ===END===