(j3.2006) J3/09-307 J3 Fortran interp letter ballot #20 - due 18-Dec-2009

Malcolm Cohen malcolm
Wed Nov 25 05:13:24 EST 2009


Bill Long wrote:
> [280:34-35] It is not clear why the entire sentence is deleted, rather
> than just changing the "variable" to "entity", or just deleting
> "variable".  After all, in 12.2.2, one of the characteristics of a
> function result is "whether it is a procedure pointer".

Because it has zero information content.

After correction, it reads
  "The characteristics of the function result are those of the [function] 
result."
which is rather tautological.

Anyway, we spell it out in tedious detail two paragraphs earlier.

> [280:36] With this edit, the sentence reads "On completion of
> execution of the function, the value returned is that of its result."
> I had thought the issue with using the word "variable" is that they
> had a "value" and that was not appropriate for a procedure pointer.

No, the issue with using the word "variable" is that
   ***procedure pointers are NOT variables***.

Variables are data objects.
Procedures are not data objects.
Procedure pointers are procedures with the POINTER attribute, and therefore also 
not data objects, and therefore also not variables.

> If so, then it seems this sentence is still defective. Do procedure
> pointers have "values"?

Sure, the value of a procedure pointer is its association.

>  [The two sentences that follow suggest that
> "value" is reserved for nonpointer results. On the other hand,
> [415:17] suggests the opposite.]

"value" is not a defined term.  One needs to understand it in the appropriate 
context.  For components we actually describe the situation fairly rigorously 
(in 4.5.7), but we don't do that for non-component pointers.

> [407:21-23] Possible alternate edits:
>
> In the first sentence, replace "result variable" with "result which
> may be a variable or a pointer". In the second sentence, delete
> "variable" twice.

I don't see why we need to give permission here.
"named result entity which is either a variable or a procedure pointer"
would be ok.  Saying "named result entity" avoids any possible misinterpretation 
of the sentence as talking about the actual value of the result at some time 
(not that that would really make sense).

> [430:13] raises the same question as to whether a pointer has a
> "value".  Maybe not an issue, since at [415:17] we pretty clearly say
> a pointer has a "value".

I don't think it's an issue.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo.
 




More information about the J3 mailing list