J3/06-341r1 Date: 3 November 2006 To: J3 From: Dick Hendrickson Subject: Clause 6 problems References: J3/06-007, 06-279 This a reworked version of paper 279 which was deferred at meeting 177. [120:8] Should that be "section subscript or subscript list" Array(1:10) isn't a whole array. See R619 on 120 "Malcolm commented: "named" already nails it down. The witter at the end (everything from the comma onwards) is just that, witter. Note that it doesn't mention components. Anyway, (1) if "whole array" is a synonym for "named array", as the text says, just delete the term and use "named array" everywhere. or (2) if "whole array" means a whole array object that is not an array section, rewrite the definition to mean that. Just saying that its designator has the final part-ref being nonzero rank with no section-subscript-list would be sufficient here. Note this is the subject of an interp." We should answer this via the interp process and get it right. [123:10-12] This should at least say "variable definition context" rather than only list two things. They surely can't be the IOMSG thing, nor an internal write unit, etc. Malcolm commented: "That would probably be better. But it does not capture the whole set of restrictions, since a vector-subscripted array is not allowed as an internal unit full stop. (And in fact one cannot READ from an array expression or constant either.) OTOH, maybe the internal unit restriction to should be removed - it doesn't make sense for READ. (Forcing the user to allocate a temporary, or call a procedure, isn't very nice.)" [125:10] In an e-mail comment about C628, Malcolm said "Another good question, now we're adding MOLD=, and before we drop the rank requirement on it, is do we want to allow ALLOCATE with SOURCE= or MOLD= to be able to take the shape from the source-expr? I would have thought the obvious answer is yes, though a number of edits would be required to make that so. Even if we don't want to do it now, if we think it would be good to do later we should not drop the rank matching requirement for MOLD= (in C637)." This should be an unresolved technical issue. [125:note 6.20, last line] This isn't a "reason". We allow A[Q] = 0, and that's not necessarily executed on image Q. the purpose of notes is to explain things, not just restate constraints. [132:4-6] It's not just these three. The termination of any executable construct can cause automatic deallocation. [132:12] There was a recent conflict on comp.lang.fortran about what "associated with the whole of an object" means. Suppose I do ALLOCATE(A(10)) and then do (the Ps are all array pointers) P0 => A P1 => A(:) P2 => A(1:10) P3 => A(10:1:-1) P4 => A(1:N) !assume N=10 P5 => A(M:N) !assume N:M = 1:10 p6(1:2,1:5) => A !rank remap which pointers can I use in a DEALLOCATE? or, if I do ALLOCATE (A(1)) P_SCALAR => A can I do DEALLOCATE (P_SCALAR)?