Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jato!vsnyder From: vsnyder@jato.jpl.nasa.gov (Van Snyder) Newsgroups: comp.lang.fortran Subject: Re: What does "adjustable array is not a dummy argument" mean? Message-ID: <1991Apr19.175028.548@jato.jpl.nasa.gov> Date: 19 Apr 91 17:50:28 GMT References: <1991Apr18.223457.23190@menudo.uh.edu> <7188@oasys.dt.navy.mil> Reply-To: vsnyder@jato.Jpl.Nasa.Gov (Van Snyder) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 35 In article <7188@oasys.dt.navy.mil> roth@oasys.dt.navy.mil (Pete Roth) writes: >In article <1991Apr18.223457.23190@menudo.uh.edu> davison@menudo.uh.edu (Dan Davison) writes: >>The Absoft Fortran compiler for the NeXT issues the warning: >> >> error on line 1446 of sn.f: adjustable array is not a dummy argument >> >[...] >> v------dummy arg >> subroutine seqin(nf,lf,Outfl,Termnl,seqid,min,n,seq,ic,nmax,*) >> parameter (ndim=10000, mdim=50000,nchr=80) >> dimension seq(mdim) >> ^-------------doesn't look adjustable to me > >Since you've dimensioned seq properly elsewhere, and you _know_ what the >maximum dimension is (mdim), how about writing the code like > > subroutine seqin(nf,lf,Outfl,Termnl,seqid,min,n,seq,ic,nmax,*) > parameter (ndim=10000, mdim=50000,nchr=80) > dimension seq(1) > ^-------------all the compiler _should_ need to know >[stuff deleted] >- - - - - - - - - - - - - - - - - - - - - - - - - - >Peter N Roth roth@oasys.dt.navy.mil >Objects in this office are closer than they appear. It's a bad idea to use "1" for the dimension of a formal argument. You should use "*" instead. The reason is that on machines with crazy addressing (read 80x86), the compiler needs to know whether the upper bound is fixed or variable. If it's variable, strenuous gymnastics are necessary, e.g. on an 8086 when the array requires more than 65k bytes. -- vsnyder@jato.Jpl.Nasa.Gov ames!elroy!jato!vsnyder vsnyder@jato.uucp