>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.
Addendum to this last sentence:
ISO 1539-1980, page 15-17, line 19:
[..] An adjustable array is undefined [..] if any variable appearing in the
adjustable array declarator is not currently associated with an actual
argument
ans is not in a common block.
So also in F77 the program is not standard conforming.
---
Meilleures Salutations,
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays Bas
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|