(j3.2006) "definable", associate-name

Bill Long longb
Sat Jun 19 19:21:03 EDT 2010

Hi Tobias,

Tobias Burnus wrote:
> Hi all,
> I got a bit confused reading the standard; Dick suggested a sensible
> reading but agreed that the wording is a bit unclear and that "there
> doesn't seem to be a normative definition of 'definable' in F2003."
> Thus, he wrote that one could consider an interpretation request. Let's
> start with a less structured email first.
> (Pre-remark. F2008 has the following normative definition: "1.3.50
> definable: capable of definition and permitted to become defined.")
> In C808 (F2003) and C801 (F2008 FDIS) one finds:
> "C801 (R804) If selector is not a variable or is a variable that has a
> vector subscript, associate-name shall not appear in a variable
> definition context (16.6.7)."
> Let "name" now be an associate name to a selector which is a variable
> with vector subscript. Obviously,
>   name = 5
> is not allowed as "name" is "the variable of an assignment-stmt"
> (16.6.7; F2003: 16.5.7). However, is
>   name(scalar_index) = 5
> allowed? Here, "name" is not the "variable" but only (?) a part-name in
> an "array-element".

name(scalar_index) does not qualify as a "name" (See 3.2.2 in 10-007). 
So C801 does not appear to literally prohibit

name(scalar_index) = 5

> I think the sensible answer is: No, it is not valid. (One can also make
> an analogy to F2003, the paragraph just above Note 12.24, but
> that's not normative for ASSOCIATE but talks about procedure arguments.)

NO is a simple answer, but I'd have to look farther to find a 
justification in the standard.   I agree with Dick that this is vaguely 
worded in the current standard.

> The question is: How to read in the standard that - if "name" is not
> definable - also "name(1)" is not definable?

That is certainly not always the case.  If fred is an assumed-size dummy 
array, then

fred = 10

is not legal ( you cannot determine the size from the declaration), but

fred(1) = 10

is fine.


> The section about variable-definition context does not seem to help.
> Tobias,
> who tends to get is confused about "name" vs. "variable" vs. "subobject
> (of a variable)" ...
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3

Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101

More information about the J3 mailing list