Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ames!skipper!altair!maine From: maine@altair.dfrf.nasa.gov (Richard Maine) Newsgroups: comp.lang.fortran Subject: Re: What does "adjustable array is not a dummy argument" mean? Message-ID: Date: 20 Apr 91 03:30:04 GMT References: <1991Apr18.223457.23190@menudo.uh.edu> <7188@oasys.dt.navy.mil> Sender: news@skipper.dfrf.nasa.gov Organization: NASA Dryden, Edwards, Cal. Lines: 47 In-reply-to: roth@oasys.dt.navy.mil's message of 19 Apr 91 11:55:15 GMT On 19 Apr 91 11:55:15 GMT, roth@oasys.dt.navy.mil (Pete Roth) said: Pete> 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 I know nothing of substance about that compiler, but my guess would be that it doesn't like the alternate return (the "*" in the subroutine statement). Note that the syntax of the alternate return is simillar to that of an adjustable array. Not identical, but it might be simillar enough to confuse the compiler. The syntax does look correct as far as I recall (I don't use alternate returns myself, so I'm not real up on them). To test this theory, try taking the ",*" out of the arg list just to see if compilation goes further. That won't solve the problem, but it might help determine wherin the problem lies. Pete> Since you've dimensioned seq properly elsewhere, and you _know_ what the Pete> maximum dimension is (mdim), how about writing the code like Pete> subroutine seqin(nf,lf,Outfl,Termnl,seqid,min,n,seq,ic,nmax,*) Pete> parameter (ndim=10000, mdim=50000,nchr=80) Pete> dimension seq(1) Pete> ^-------------all the compiler _should_ need to know Well, you could try, but the original looks very innocuous in this area. I'd bet (but not too much :-)) that this wouldn't help. Also note that while it is *very* common practice to use dimensions of 1 in this way, it is not strictly standard. And yes, I have seen compilers where it mattered. For instance, some compilers might refuse to allow subscripts larger than 1 if the array is declared like this, giving either compile-time or run-time errors, depending on specifics. I think I recall a CDC compiler where this worked, but made run-time array-bounds checking useless, for instance. -- -- Richard Maine maine@altair.dfrf.nasa.gov