home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!deccrl!news.crl.dec.com!pa.dec.com!engage.pko.dec.com!e2big.mko.dec.com!quark.enet.dec.com!lionel
- From: lionel@quark.enet.dec.com (Steve Lionel)
- Newsgroups: comp.lang.fortran
- Subject: Re: Help for rs6k passed arrays (old fortran)?
- Message-ID: <1992Sep3.194741.23806@e2big.mko.dec.com>
- Date: 3 Sep 92 22:54:22 GMT
- References: <6556@lhdsy1.lahabra.chevron.com>
- Sender: guest@e2big.mko.dec.com (Guest (DECnet))
- Organization: Digital Equipment Corporation
- Lines: 30
-
-
- In article <6556@lhdsy1.lahabra.chevron.com>, jpr@lhdsy1.lahabra.chevron.com
- (John C. Prestridge) writes...
- >
- >Excuse me if this question was asked before.
- >
- >In some old fortran programs, the array dimension is passed to the subroutine
- >with a argument size of 1, For Example:
- >
- > [example omitted]
-
- >In many machines, the compilation of such a routine would not give compilation
- >errors and/or warnings, but on the rs6000 a warning is given about a CONSTANT
- >SUBSCRIPT IS OUT OF BOUNDS for each such occurrence in the code. In many large
- >codes there are very large numbers of such occurrences. Is there some method
- >to tell the compiler that the code is an earlier FORTRAN, so that such
- >warnings would not be generated?
- >
-
- The standard way of expressing this is to declare the upper bound with
- an asterisk; this makes it an "assumed size array". Many compilers
- (including Digital's) treat a last dimension of 1 as an implicit assumed
- size array for compatibility with many old programs which used this
- convention (it was never a part of a FORTRAN standard).
-
- Steve Lionel lionel@quark.enet.dec.com
- SDT Languages Group
- Digital Equipment Corporation
- 110 Spit Brook Road
- Nashua, NH 03062
-