[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::fortran

Title:Digital Fortran
Notice:Read notes 1.* for important information
Moderator:QUARK::LIONEL
Created:Thu Jun 01 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1333
Total number of notes:6734

1283.0. "adjustable Array" by RTOMS::PARETIJ () Tue May 06 1997 15:38

Unix 4.0b Fortran 90 V4.1-270 

I would expect a warning when compiling the following 
code, but that doesn't occur :

rawhide.rto.dec.com> cat foo.f
      SUBROUTINE T(N)

      DIMENSION C(N)

      C(1) = 1.

      RETURN
      END
rawhide.rto.dec.com> f90 -V -c -O foo.f
rawhide.rto.dec.com>
rawhide.rto.dec.com> f77 -V -c foo.f
fort: Severe: foo.f, line 3: Variable name, constant, or expression invalid in t
his context
      DIMENSION C(N)
----------------^

Apparently using an older compiler version (4.0 ) allows f77 -V -c foo.f
without any warning ???



T.RTitleUserPersonal
Name
DateLines
1283.1QUARK::LIONELFree advice is worth every centTue May 06 1997 15:515
This is an automatic array, a new F90 feature, since the array name does not
appear as an argument.  It is also supported in F77, but I think there was
a bug in F77 4.1 that broke it.  Dave will be able to fill in the details.

			Steve
1283.2Something old, something newTLE::EKLUNDAlways smiling on the inside!Tue May 06 1997 20:5411
    	We implemented the Fortran-90 automatic array feature in
    Fortran-77, and then broke it (I presume your f77 compiler is
    edit 4-92).  If one allows an f90 automatic array, your program
    is just fine.  We fixed the bug (see note 1167) with a later edit
    to f77.  It has not appeared in an update kit yet.  I verified
    that our current f77 compiler handles your source example just
    fine.
    
    Cheers!
    Dave Eklund