Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ames!aurora!labrea!jade!violet.berkeley.edu!lagache From: lagache@violet.berkeley.edu (Edouard Lagache) Newsgroups: comp.lang.fortran Subject: FORTRAN value passed parameters revisited Message-ID: <5359@jade.BERKELEY.EDU> Date: Thu, 8-Oct-87 12:00:24 EDT Article-I.D.: jade.5359 Posted: Thu Oct 8 12:00:24 1987 Date-Received: Sun, 11-Oct-87 08:41:59 EDT Sender: usenet@jade.BERKELEY.EDU Reply-To: lagache@violet.berkeley.edu (Edouard Lagache) Organization: University of California, Berkeley Lines: 19 Keywords: Value passed, f77 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. Because this is a Kluge of the first degree, it is very implementation dependant and shouldn't be used as normal practice, but I would think that is a useful fact to know for desperate emergencies. I recieved mail to this effect from several people (whom I thank for reminding me of exactly how dirty this trick is), 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. However, just wrapping an extra set of parantheses does seem to do the trick. It might be interesting to see what must be done to "tickle" various FORTRAN compilers to give value passed parameters. Edouard Lagache lagache@violet.berkeley.edu