Re: a problem in subroutine



James Giles wrote:
glen herrmannsfeldt wrote:

I believe it is illegal in Fortran 66. END is a non-executable
statement, such that control should never reach it.

In fact, in Fortran 66 it wasn't a statement of any kind. It
was specified in the standard document as an "end line".
This distinguished it from a comment line or a source
line. Rather like Fortran 90's INCLUDE line.

It seems that it is distinguished such that it must be
written on only one line, with no continuations.

Though I did once, before I knew that rule, try:

E
XN
XD

With VAX/VMS Fortran and it worked.

Not allowing continuations means the compiler can
detect END without reading the following line (to
check for continuations).

There is also:

"Any program unit consists of statements and comments."

Since END isn't a comment, that makes it seem like a statement,
but statements are allowed continuations...

It is, at least, not an executable statement.

-- glen

.