Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!hsdndev!cmcl2!lanl!cochiti.lanl.gov!jlg From: jlg@cochiti.lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: matrix multiplication Keywords: parameters, pass-by-value, pass-by-reference Message-ID: <23261@lanl.gov> Date: 6 May 91 15:20:39 GMT References: <1991May04.170203.22222@ariel.unm.edu> Sender: news@lanl.gov Organization: Los Alamos National Laboratory Lines: 19 In article <1991May04.170203.22222@ariel.unm.edu>, scavo@cie.uoregon.edu (Tom Scavo) writes: |> [...] Also, does anyone know of a Fortran |> compiler that implements pass-by-value-result, a kind of delayed |> pass-by-reference where the actual parameters are updated at the |> point of return? Or is this non-standard? It is quite within the standard to pass procedure arguments by value/result. It is also standard to pass by reference. The reason for the Fortran prohibition of aliasing parameters through procedure calls is to make the semantics of both forms of procedure call identical. That's why you can't do MATMLT(X,Y,X,M,N,M) - if the procedure assigns to X. If you were allowed to do so, the semantics of the two parameter passing methods would be different. Yes, you can implement Fortran with value/result parameters. The bad news is that it still doesn't do what you want since aliasing IN and INOUT (or OUT) parameters is illegal. J. Giles