08-174 To: J3 From: Malcolm Cohen Subject: Interp F03/0077 Date: 2008 May 13 1. Introduction =============== I have revised the question to this interpretation request. I hope that Aleks does not consider this to be a disimprovement. I have deleted his suggestion of rewording Note 6.6; this might be a good suggestion for F2008 but is not necessary in an interp. I have also noted that UBOUND is similarly faulty and provided edits to fix that. I also note that C.12.12 first sentence [496:9] is untrue, and bring the editor's attention to this for correction in F2008. The sentence at [497:8-9] is also somewhat suboptimal. The use of "whole array operations" later in Annex C could also be beneficially altered to "array operations". BTW, when producing the edits below I searched for "whole" throughout the whole 04-007 and believe I have caught all the cases that ought to be changed. 2. The revised interpretation ============================= ---------------------------------------------------------------------- NUMBER: F03/0077 TITLE: LBOUND of array structure component KEYWORDS: LBOUND, lower bounds, bounds, structure component, array sections DEFECT TYPE: ERRATUM STATUS: J3 consideration in progress QUESTION: Given the declarations TYPE t REAL x REAL y(-5:5) END TYPE TYPE(t) z(10:20) What is the result of the following LBOUND references: LBOUND(z%x) LBOUND(z(10)%y) The confusion arises because the existing definition of LBOUND uses the undefined term "array structure component" in determining whether to return the lower bound in the or 1. It seems clear that Z(10)%Y must be an array structure component (so the answer ought to be -5) but it is not clear whether Z%X is one and therefore whether the result of that LBOUND ought to be 1 or 10. ANSWER: Yes, the result of the first LBOUND is indeed -5. The result of the second LBOUND is 1. Clarifying edits are provided. The description of the intrinsic function UBOUND suffers from the same flaw, and the edits provided fix that function as well. EDITS: To avoid the undefined term, or any long phrase, the edit changes the definition of "whole array" to include the case of a whole array component of a structure. [107:2-3] Replace the existing definition which is "A whole array is a named array, which may be either a named constant (5.1.2.10, 5.2.9) or a variable; no subscript list is appended to the name." with "A <> is a named array or a structure component whose final is an array component name; no subscript list is appended." {Make "whole array" include the whole array component case.} [107:7-8] Replace "whole array name" with "whole array designator", twice. [326:8] After "a whole array" delete "or array structure component". {No longer need kludgy wording in LBOUND.} [358:6-7] After "a whole array" delete "or array structure component". {No longer need kludgy wording in UBOUND.} [436:36] After "named array" insert "or array component of a structure, with no subscript list." {Fix the glossary.} SUBMITTED BY: Aleksandar Donev HISTORY: 06-118 m175 F03/0077 Submitted 08-174 m184 Revised with edits. ----------------------------------------------------------------------