Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!news.cs.indiana.edu!ariel.unm.edu!ghostwheel.unm.edu!john From: john@ghostwheel.unm.edu (John Prentice) Newsgroups: comp.lang.fortran Subject: Re: Fortran vs. C for numerical work (SUMMARY) Message-ID: <1990Dec6.105400.27449@ariel.unm.edu> Date: 6 Dec 90 10:54:00 GMT References: <1990Nov21.220816.15220@rice.edu> <2173@tuvie> <1990Dec3.191100.22176@ariel.unm.edu> <4450@goanna.cs.rmit.oz.au> Sender: news@ariel.unm.edu (USENET News System) Organization: University of New Mexico Math Dept., Albuquerque, NM Lines: 42 In article <4450@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: >> Assuming I am reading the original posting correctly, there is nothing >> to preclude this in Fortran. Specifically, imagine the following code: >> real*8 a >> pointer (a,ipnt) <======================== > >My question was specifically about F77, by which I meant the 1978 ANSI >Fortran standard. "pointer" is not part of that language. > and then later... > ...The question stands: is passing a scalar (D=0) or an array >taking D subscripts to a subprogram expecting an array taking E.ne.D >subscripts legal in standard Fortran 77? > Sorry I confused you with pointers. Now you have confused me with this last paragraph. However, to give a simple answer to your original question. If I followed your original question, it could be condensed to whether the following is legal in Fortran 77: program test real a(25) call ralph (a) end subroutine ralph (b) real b(5,5) . . . end and the answer is yes, it is perfectly legal in ANSI Fortran 77. By the way, my use of pointers was not even relevant to your question, I just happened to be playing with this form of dynamic memory allocation at the time. In any case, the pointers also did not in any way affect the way the subroutine was called or how it used it. All my pointers did was allow me to dimension my array in the main routine on the fly. It was a poor choice of example to answer a simple question. My apologies. John Prentice john@unmfys.unm.edu