Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!mcnc!xanth!kent From: kent@xanth.UUCP (Kent Paul Dolan) Newsgroups: comp.lang.fortran Subject: Re: FORTRAN value passed parameters revisited Message-ID: <2702@xanth.UUCP> Date: Fri, 9-Oct-87 15:06:50 EDT Article-I.D.: xanth.2702 Posted: Fri Oct 9 15:06:50 1987 Date-Received: Sun, 11-Oct-87 16:49:27 EDT References: <5359@jade.BERKELEY.EDU> Reply-To: kent@xanth.UUCP (Kent Paul Dolan) Organization: Old Dominion University, Norfolk Va. Lines: 18 Keywords: Value passed, f77 In article <5359@jade.BERKELEY.EDU> lagache@violet.berkeley.edu (Edouard Lagache) writes: > > A few days ago I pointed out a dirty trick that ought to make > if possible to have the effect of value passed parameters in FORTRAN. >[...]but I also recieved > a message that it doesn't work under some cases. Apparantly, the f77 > compiler "sees" through the 'X+0' trick and makes X a variable pass > parameter. Wow! It seems to me that changing an expression to a variable ought to count as a MAJOR, MAJOR bug in an f77 compiler. That can NEVER be what the programmer intended; that also means the compiler did the conversion of "+0" to a nil action BEFORE classifying the string "(X+0)" as an expression. Yuk! Comments? Kent, the man from xanth.