At 10:31 18-12-97 +0000, you wrote:
>%cat toto.f
> dimension x(3)
> call glu(3,x)
> print *,x(1)
> call sglu(x)
> print *,x(2)
> end
> subroutine glu(n,a)
> dimension a(n)
> a(1)=1.
> return
> entry sglu(a)
> a(2)=2.
> end
>What do you think of this "small" Fortran program
>according Fortran77 / Fortran90 norms ?
>
>HP Fortran90 version 1. No compilation error / Output is 1. + Error
>messages
>Fortran90 MIPSpro version 7.2 No compilation error / Output is 1. and 2.
>Nag Fortran90 version 2.2 No compilation error /Output is 1. and 2.
>
My results / Mes résultats:
Salford FTN95: Compilation: NO ERRORS
Output 1.0000
2.0000
Salford FTN90: Compilation: NO ERRORS
Output 1.0000
General protection error in routine GLUENTRY
Ryan/McFarland Fortran 77: Compile & Link OK:
Output 1.0000
2.0000
Program is not standard conforming :
Fortran 95: 12.5.2.4
Array , dimension(N) must not be used without N in arglist.
As I understand by reading page 216, SEPT 1997
Fortran 77 Standard seems not to specify behaviour in this case.
---
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
P.O. Box 354
2600 AJ Delft
Netherlands
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|