(j3.2006) F03/0110
Robert Corbett
robert.corbett
Thu Aug 25 21:09:35 EDT 2011
The answer given for interpretation F03/0110 says that
the example
FUNCTION S()
T = 13.0
ENTRY T()
END
is not standard-conforming "since no return value
is set for T()."
Consider the program
FUNCTION S()
T = 13.0
ENTRY T()
END
PROGRAM MAIN
X = S()
END
Clause 1.5 of 10-007r1 defines a standard-conforming
program as
A program (2.2.2) is a standard-conforming
program if it uses only those forms and
relationships described herein and if the
program has an interpretation according to
this part of ISO/IEC 1539.
The program shown above "uses only the forms and
relationships" described in 10-007r1. It also
"has an interpretation" according to 10-007r1,
albeit an uninteresting one. The result variables
S and T are storage associated (see paragraph 3 of
Clause 12.6.2.6) and so the assignment to T causes
S to be defined. Thus, the requirement
If the result variable is not a pointer,
its value shall be defined by the function.
(paragraph 4 of Clause 12.6.2.2) is satisfied.
I find it difficult to understand how a program that
is standard conforming can contain a function that
is not standard conforming.
Robert Corbett
More information about the J3
mailing list