Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ames!sdcsvax!ucbvax!LBL-RTSG.ARPA!vern%lbl-helios From: vern%lbl-helios@LBL-RTSG.ARPA (Vern Paxson) Newsgroups: comp.lang.fortran Subject: Re: f77 THERE ARE NO VALUE PARAMETERS IN FORTRAN (yes there is!) Message-ID: <8710070259.AA00781@lbl-helios> Date: Tue, 6-Oct-87 22:55:44 EDT Article-I.D.: lbl-heli.8710070259.AA00781 Posted: Tue Oct 6 22:55:44 1987 Date-Received: Sat, 10-Oct-87 06:27:25 EDT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: vern%lbl-helios.arpa@lbl-rtsg.arpa Lines: 30 > This is a minor point but there is a way to force FORTRAN > to give you value parameters. Simply wrap the variables in > the subprogram CALL with parentheses.... This won't always work. To whit: Script started on Tue Oct 6 19:50:11 1987 helios 1 % cat >ftest1.f subroutine foo call bar( i ) end helios 2 % cat >ftest2.f subroutine foo call bar( (i + 0) ) end helios 3 % f77 -S ftest1.f ftest1.f: foo: helios 4 % f77 -S ftest2.f ftest2.f: foo: helios 5 % diff ftest1.s ftest2.s helios 6 % ^D script done on Tue Oct 6 19:50:57 1987 Vern Vern Paxson vern@lbl-csam.arpa Real Time Systems ucbvax!lbl-csam.arpa!vern Lawrence Berkeley Laboratory (415) 486-6411