home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / fortran / 3411 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.7 KB

  1. 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
  2. From: lionel@quark.enet.dec.com (Steve Lionel)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Help for rs6k passed arrays (old fortran)?
  5. Message-ID: <1992Sep3.194741.23806@e2big.mko.dec.com>
  6. Date: 3 Sep 92 22:54:22 GMT
  7. References: <6556@lhdsy1.lahabra.chevron.com>
  8. Sender: guest@e2big.mko.dec.com (Guest (DECnet))
  9. Organization: Digital Equipment Corporation
  10. Lines: 30
  11.  
  12.  
  13. In article <6556@lhdsy1.lahabra.chevron.com>, jpr@lhdsy1.lahabra.chevron.com 
  14. (John C. Prestridge) writes...
  15. >Excuse me if this question was asked before.
  16. >In some old fortran programs, the array dimension is passed to the subroutine
  17. >with a argument size of 1,   For Example:
  18. >                
  19. > [example omitted]
  20.  
  21. >In many machines, the compilation of such a routine would not give compilation
  22. >errors and/or warnings, but on the rs6000 a warning is given about a CONSTANT
  23. >SUBSCRIPT IS OUT OF BOUNDS for each such occurrence in the code.  In many large
  24. >codes there are very large numbers of such occurrences.  Is there some method
  25. >to tell the compiler that the code is an earlier FORTRAN, so that such 
  26. >warnings would not be generated?    
  27.  
  28. The standard way of expressing this is to declare the upper bound with
  29. an asterisk; this makes it an "assumed size array".  Many compilers
  30. (including Digital's) treat a last dimension of 1 as an implicit assumed
  31. size array for compatibility with many old programs which used this
  32. convention (it was never a part of a FORTRAN standard).
  33.  
  34. Steve Lionel                    lionel@quark.enet.dec.com
  35. SDT Languages Group
  36. Digital Equipment Corporation
  37. 110 Spit Brook Road
  38. Nashua, NH 03062
  39.