[comp.lang.fortran] f77 THERE ARE NO VALUE PARAMETERS IN FORTRAN

vern%lbl-helios@LBL-RTSG.ARPA (Vern Paxson) (10/07/87)

> 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