Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!cs.umn.edu!uc!shamash!hare!ddh From: ddh@hare.cdc.com (Dan Horsfall) Newsgroups: comp.lang.fortran Subject: Re: What does "adjustable array is not a dummy argument" mean? Message-ID: <32399@shamash.cdc.com> Date: 19 Apr 91 17:25:05 GMT References: <1991Apr18.223457.23190@menudo.uh.edu> <7188@oasys.dt.navy.mil> Sender: usenet@shamash.cdc.com Reply-To: ddh@dash.udev.cdc.com (Dan Horsfall) Organization: Control Data Corp, Arden Hills, MN Lines: 32 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: > [...] > > 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 (gently, he suggests) No, please don't do it that way. That's what dimension seq(*) was designed for. Altho many compilers will treat (1) the same way, those that are capable of array bounds checking ("abc") will gag on (1) when (*) is intended. This could degenerate into a style war, which is NOT intended. -- Horse + Control Data Corporation Dan Horsfall +1-612-482-4622 + 4201 Lexington Ave North Internet ddh@dash.udev.cdc.com + Arden Hills MN 55126 USA