Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!ucbvax!MIT-MULTICS.ARPA!Schauble From: Schauble@MIT-MULTICS.ARPA.UUCP Newsgroups: mod.computers.vax Subject: Null arguments in VMS Fortran Message-ID: <870105082506.589990@MIT-MULTICS.ARPA> Date: Mon, 5-Jan-87 03:25:00 EST Article-I.D.: MIT-MULT.870105082506.589990 Posted: Mon Jan 5 03:25:00 1987 Date-Received: Mon, 5-Jan-87 05:35:50 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 24 Approved: info-vax@sri-kl.arpa My previous question about null arguments produced two replies to the effect that, yes, the subroutine can be written in Fortran. They proposed something like CALL SUBB(X,,Y) subroutine subb(a,b,c) ... v = default if (%loc(b).ne.0) v = b Assume that this is the only reference to b in the subroutine. This looks good except for one small problem. Several compilers that I have dealt with that use a similar linkage convention will generate a preamble that will move read-only formal parameters into the subroutine's local data space. Further references can be done faster than the indirect reference usually needed for a parameter. I know that VMS Fortran has a very good optimizer. Does it really not do this optimization? And does the above really work? Thanks, Paul