[comp.lang.fortran] FPS-500 fortran adjustable array error

vsnyder@jato.jpl.nasa.gov (Van Snyder) (03/15/91)

In article <27452@uflorida.cis.ufl.EDU> peloquin@qtp.ufl.edu (Renee P. Peloquin) writes:
>I thought the fortran standard allowed dimensioning an adjustable array to
>ANYTHING.   However, on the FPS-500, (strings on `which f77` reveals 
>$Header: crt0.c,v 1.10 88/09/20 14:11:01 grace Rel $
>4.6 (Berkeley) 3/30/83
>$Header: f77.c,v 1.148 90/06/06 09:54:38 steve Rel $  )
>
>The following subroutine, of which I have included salient parts:
>      subroutine fij11 (fij, eom, neom, ns, irrep, ispin, iprd)
>
>      integer iofft1ip, nt1ip, ipsytyp, iprpdpd, symvab, symvij, symvia,
>     $     nfab(2), nfij(2), nfia(1)
>      common /ipsym/ iofft1ip(maxrep,2), nt1ip(2),
>     $     ipsytyp(2,100), iprpdpd(maxrep,6),
>     $     symvab(maxrep,2), symvij(maxrep,2), symvia(maxrep,2),
>     $     nfab, nfij, nfia
>
>      double precision fij(nfij), eom(neom,*)
>
>Gets the following error messages on compilation:
>Error on line 49 of makfij.f: no vector operands allowed
>Error on line 77 of makfij.f: no vector operands allowed
>
>(Where lines 49 and 77 are the first and last executable lines.)
>Replacing the "double precision" line with:
>      double precision fij(*), eom(neom,*)
>
>Causes the subroutine to compile without complaint.
>
>Does anybody know why? Is this a bug or a feature?
>
>
>-- 
>Renee P. Mattie
>mattie@sun0.chem.upenn.edu

It's a bug, but in your code: you can only use scalars for dimensioning
parameters; you've used an array of length 2, viz. nfij.

Regards, Van.

-- 
vsnyder@jato.Jpl.Nasa.Gov
ames!elroy!jato!vsnyder
vsnyder@jato.uucp