Re: fortran 90/95 standard
- From: "[JvO]" <jvo_36@xxxxxxxxxxx>
- Date: 9 Nov 2005 03:06:07 -0800
Patrick Begou schreef:
> I've a small question about fortran 90/95 standard:
>
> I've a function using implicit types:
First: try to avoid implicit typing :-)
> SUBROUTINE eval(nx,nz,i,k,neq,u,vec)
> IMPLICIT REAL (a-h,o-z)
> IMPLICIT INTEGER (i-n)
> COMMON /use1/ mx,my,nd
> .....
> END SUBROUTINE eval
>
> Using gfortran (gcc-gfortran-4.0.1-4.fc4) it compiles but, puting this
> function in a module with "implicit none" do not compile ("variable my
> has no type"):
>
> MODULE mod_avanti_e
>
> IMPLICIT NONE
>
> CONTAINS
>
> SUBROUTINE eval(nx,nz,i,k,neq,u,vec)
> IMPLICIT REAL (a-h,o-z)
> IMPLICIT INTEGER (i-n)
> COMMON /use1/ mx,my,nd
> .....
> END SUBROUTINE eval
>
> END MODULE mod_avanti_e
>
> This occur with gfortran but not with intel compiler nor IBM xlf
> compiler. Is it normal behavior (gfortran beeing more strict about
> fortran language) or an error in the compiler ?
This must be a bug in the compiler. The code is correct.
> I'm porting a big fortran 77 code in fortran90/95 ans there are a lot of
> such subroutine to rewrite in "implicit none".... and it needs time!
It may be worthwhile to add IMPLICIT NONE and declare all vaiables
explicitly , gradually...
[JvO]
.
- References:
- fortran 90/95 standart
- From: Patrick Begou
- fortran 90/95 standart
- Prev by Date: fortran 90/95 standart
- Next by Date: Re: fortran 90/95 standart
- Previous by thread: fortran 90/95 standart
- Next by thread: Re: fortran 90/95 standart
- Index(es):
Relevant Pages
|