Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!necntc!culdev1!drw From: drw@culdev1.UUCP (Dale Worley) Newsgroups: comp.lang.misc Subject: call by address (was Re: compilers and linkers) Message-ID: <1783@culdev1.UUCP> Date: Tue, 24-Nov-87 17:18:41 EST Article-I.D.: culdev1.1783 Posted: Tue Nov 24 17:18:41 1987 Date-Received: Sat, 28-Nov-87 05:25:50 EST Organization: Cullinet Software, Westwood, MA, USA Lines: 20 barmar@think.COM (Barry Margolin) writes: | >If all parameters are truly passed by address, then the constant "3" | >would be changed for I.EQ.1 and therefore the second invocation of | >FUNC would return .FALSE. | | It doesn't have to do that. It depends on what the "address" of a | constant is. Except for some early, buggy ones, most call-by-address | implementations treat a literal parameter as an expression: [...] The Fortran II language consistently treated constant arguments by passing the address of the original constant. Since all occurrances of one constant value were treated the same, it made for some hard to find bugs. The language manual pointed out that using constants for arguments that were assigned to was invalid. They wised up when they wrote Fortran IV. Dale -- Dale Worley Cullinet Software ARPA: culdev1!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!culdev1!drw If you get fed twice a day, how bad can life be?