> Date: Mon, 21 Jan 2002 18:47:13 +0010
> From: [log in to unmask]
> Robin Vowels wrote:
> >> Date: Wed, 16 Jan 2002 21:13:05 +0800
> >> From: frank_ouyang <[log in to unmask]>
> >
> >> Hello:
> >>
> >> There is a example as follow:
> >>
> >> parameter(m=2,n=2)
> >> A(m,n)
> ^^^^^^^^^
> REAL A(m,n)
>
> which I guess is an oversight, else any compiler would have complained.
>
> >> call BB(A,m,n)
> >> stop
> >> end
> >>
> >> subroutine BB(A,m,n)
> >> real A(*,*)
> >> ^^^^^^? Corret?
> >> return
> >> end
> >>
> >> While programming, I am told that It is wrong with A(*,*).However, A(m,*)
> is
> >> OK!
> >> How can I deal with it?
> >
> >Try: real A(m,n)
> >
> >> Thanks
>
> Well, I guess you deal with it as you suggest: A(m,*).
>
> Robin's suggestion makes things slightly more readable but should not matter
> F77 or F90/95, A(m,*) versus A(m,n).
It does matter.
If you use A(m,*), it is not possible to use WRITE (*,*) A
nor is it possible on most compilers to have subscript checking of Array A.
A(m,n) allows you to do both.
> Regards, Paddy
|