Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!news.cs.indiana.edu!ariel.unm.edu!cie!scavo From: scavo@cie.uoregon.edu (Tom Scavo) Newsgroups: comp.lang.fortran Subject: Re: matrix multiplication Summary: Is pass-by-value-result *standard*? Keywords: parameters, pass-by-value, pass-by-reference Message-ID: <1991May07.155218.13741@ariel.unm.edu> Date: 7 May 91 15:52:18 GMT References: <1991May04.170203.22222@ariel.unm.edu> <23261@lanl.gov> Reply-To: scavo@cie.uoregon.edu (Tom Scavo) Organization: University of Oregon Campus Information Exchange Lines: 39 In an earlier article, I naively ask: > > 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? In article <3444@charon.cwi.nl> dik@cwi.nl (Dik T. Winter) writes: >This is certainly non-standard in general. For simple variables it >is implemented on a large number of compilers (IBM amongst them). In article <23261@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: >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. So what is the concensus on this issue? Is it within the standard to implement pass-by-value-result? If so, what compilers have gone this route? As an aside, how did it happen that two competing parameter passing mechanisms got into the Fortran 77 standard? (This question assumes, of course, that this is indeed the case.) Was it an error of omission on the part of the standards committee, or were the insecurities of pass-by-reference simply not known at the time? (I'm just interested in a proper historical perspective.) Looking to the future, how does Fortran 90 deal with the parameter passing problem? Tom Scavo scavo@cie.uoregon.edu