(j3.2006) free source form continuations

Kurt W Hirchert hirchert
Sat Aug 9 20:19:49 EDT 2014


On 8/9/2014 9:04 AM, John Reid wrote:
>
> Robert Corbett wrote:
>> A user recently asserted that code such as
>>
>> PROGRAM&
>> MAIN
>> END
>>
>> is standard conforming and that Oracle Solaris Studio Fortran incorrectly
>> rejects it.  Oracle Solaris Studio Fortran treats the first two lines as
>> equivalent to
>>
>> PROGRAMMAIN
>>
>> and rejects the code because there is no space between the two intended tokens
>> as required by Subclause 3.3.2.2 paragraph 2.  The user asserts that the tokens
>> PROGRAM and MAIN are distinct tokens because the second line does not start with
>> an "&" as required by Subclause 3.3.2.4 paragraph 3.
>>
>> Do the rules for free source form continuation cover such code?  If so, what is
>> the intended interpretation?
> I am with you. 3.3.2.4p2 contains the rules that say this. PROGRAM and
> MAIN are indeed distinct tokens - they are not permitted to be jammed
> together in this way.
I am somewhere in the middle.  I am inclined to agree with the user that 
the lack of a confirming & on the second line implies that the two lines 
cannot be be one token (based on the requirement of 3.3.2.4p3).  I see 
nothing in 3.3.2.4p2 that contradicts this. However, the fact that 
clever consideration of 3.3.2.4p3 makes these two separate tokens 
doesn't eliminate the requirement of 3.3.2.2p2 that there be a blank 
between the two tokens, so the program is not standard conforming.

In other words, I think it is acceptable for OSSF to reject this 
program, but its reasons may be questionable.  Let me explore a related 
question.  If the user's program had been written
PROGRAM MA&
IN
END
would OSSF have accepted or rejected it?  (It violates 3.3.2.4p3, so it 
should be rejected, at least in whatever mode checks for standard 
conformance.)

Of the two examples, I find the original one more visually intuitive, so 
I could imagine some future revision of the standard extending 3.3.2.4p3 
so the absence of the confirming & would be considered equivalent to a 
blank between the two lines (as opposed to a revision that removed the 
requirement in 3.3.2.4p3).

-Kurt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20140809/cab9a5e5/attachment.html 



More information about the J3 mailing list