On Fri, Feb 26, 2010 at 8:06 AM, Robert Kern <robert.k...@gmail.com> wrote:
> On Fri, Feb 26, 2010 at 04:42, David Cournapeau <da...@silveregg.co.jp> > wrote: > > > I don't really know the assumptions made by f2py otherwise: is it > > prevalent for most fortran compilers to pass most things by reference ? > > I think that's part of the standardized semantics, yes. That said, > some things in the C API like how to pass the length of a character > string are not standardized and are sometimes passed by value. > > Old Fortran didn't use stacks, all the data was collected into a section of memory and the subroutine referenced that memory location; think of it as an anonymous common. The addition of stack variables and the possibility of recursion was an innovation and originally required a special declaration that the variable was local, i.e., on a stack. I don't know how modern Fortran is implemented but using references has a long tradition in the language. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion