(j3.2006) free source form continuations
Bill Long
longb
Sun Aug 10 11:50:01 EDT 2014
On Aug 9, 2014, at 2:20 AM, Robert Corbett <robert.corbett at oracle.com> 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.
I don?t agree with your user. If he wants the required blank, he should start the second line with a space character, or insert one before the & in the first line. If the & on line 1 were to somehow imply insertion of a space character, then the programs that use this sort of continuation to continue extra-long variable names across lines would suddenly not work. (The Cray compiler also gives a error for this example.)
Cheers,
Bill
>
> Do the rules for free source form continuation cover such code? If so, what is
> the intended interpretation?
>
> Bob Corbett
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Bill Long longb at cray.com
Fortran Technical Suport & 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