Re: Program runs slower than the beginning





James Giles wrote:
Richard E Maine wrote:
...

Well, ok if it is just a type name, but there are more forms than
names allowed. There is a (obsolescent) case of character that
allows an optional comma in a spot that seems spurious to me.
Darned if I know why that comma is allowed, but there must have
been a reason, I suppose. It goes back to f77.


This made me curious, so I went and checked.  Yes, the comma
is allowed in F77 too.  On the other hand, there are implementations
that sometimes don't accept it.  Consider:

   character*5, , parameter :: message="Stop!"

This is refused by the compilers I tried, though it's permitted by
the numbered syntax rules of the standard document.
[snip]
I think you missed constraint C420 (in F2003) (which is the
same as the 6th constraint after R510 in F95) which says
the optional comma after the *5 is only allowed if there
is no :: .

But, to be fair, it took me a while to find that.

Dick Hendrickson

Dick Hendrickson

.