old-style variable initialization with g95

Steve Kargl sgk@troutmask.apl.washington.edu
Sat Aug 28 17:22:00 GMT 2004


On Sat, Aug 28, 2004 at 09:53:04AM -0700, Hans Horn wrote:
> I'm doing my first baby-steps using g95 and am running into compilation 
> problems due to old-style variable
> initializations such as
> Integer I /0/, J /1/
> Real*8 R(6) /6*0/
> Logical L /.false./
> 
> This is an f77 extension that is widely supported by commercial compilers - 
> including g77.
> Does anyone happen to know the gfortran option that enables these 
> constructs? (I sure hope there is such an option)
> 

This is PR 13910 in the bugs database.  In the meanwhile,
you could actually try writing portable, standard conforming
code.

program rr
  integer :: I=0, J=1
  real(kind(1d0)) :: R(6)=0.D0
  logical :: L =.false. 
  print *, i, j
  print *, r
  print *, l
end program rr


-- 
Steve



More information about the Fortran mailing list