home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!burley
- From: burley@geech.gnu.ai.mit.edu (Craig Burley)
- Newsgroups: comp.lang.fortran
- Subject: Re: F77, array passing question, dimensions.
- Message-ID: <BURLEY.92Aug26123830@geech.gnu.ai.mit.edu>
- Date: 26 Aug 92 16:38:30 GMT
- References: <1992Aug26.032018.20430@news.clarkson.edu>
- Sender: news@ai.mit.edu
- Organization: Free Software Foundation 545 Tech Square Cambridge, MA 02139
- Lines: 17
- In-reply-to: russell@sun.soe.clarkson.edu's message of 26 Aug 92 03:20:18 GMT
-
- In article <1992Aug26.032018.20430@news.clarkson.edu> russell@sun.soe.clarkson.edu (David Russell) writes:
-
- Given an array dimensioned to lets say 10 in a calling routine,
- and given the fact that only the first three values are needed in
- the called routine, is there any advantage or disadvantage to
- dimensioning the array to only 3 in the called routine.
-
- Generally, no. Most implementations will just pass the address of the
- first element of the array, which is contiguous in memory. A few
- implementations might involve passing the data values themselves; F77
- permits this; but they are quite rare. If you find yourself running
- on such an implementation, you could EQUIVALENCE the 10-element array
- to a 3-element one and pass the latter.
- --
-
- James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu
- Member of the League for Programming Freedom (LPF)
-