anything like C++ references?

Tim Roberts timr at
Sun Jul 20 01:22:49 CEST 2003

"Terry Reedy" <tjreedy at> wrote:
>"Stephen Horne" <intentionally at> wrote in message
>> Anyway, Algol and Fortran apparently (I didn't know this until
>> today) *always* used call-by-reference.
>Not true (about Fortran).  I vaguely remember (about 1980) when IBM
>Fortran switched from one calling convention to another.

No, you don't.

A simple variable name is required to be passed by reference (or at least
passed so it SIMULATES pass-by-reference), at least until Fortran90.
Expressions in a parameter list are passed by value, of course, and you
could force the compiler to use call-by-value by using trickery like:

PARAM2 and PARAM3 would usually by passed by value.

I absolutely refuse to believe that IBM would have arbitrarily changed
their Fortran compiler's default calling convention in 1980.  The F77
standard simply would not allow it, if you were even using F77; much
Fortran code was still F66 until well into the 1980s.
- Tim Roberts, timr at
  Providenza & Boekelheide, Inc.

More information about the Python-list mailing list