Xref: utzoo comp.lang.fortran:2378 comp.os.vms:17014 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!mcnc!ecsvax!urjlew From: urjlew@ecsvax.UUCP (Rostyk Lewyckyj) Newsgroups: comp.lang.fortran,comp.os.vms Subject: Re: Question about variables local to subroutine Summary: How about this one? Keywords: Local variables, subroutines Message-ID: <7554@ecsvax.UUCP> Date: 23 Aug 89 19:05:18 GMT References: <24891@iuvax.cs.indiana.edu> <123145@sun.Eng.Sun.COM> Followup-To: comp.lang.fortran,poster Organization: UNC Educational Computing Service Lines: 29 In a similar vein to saving values of local variables in subroutines across invocations. What does the standard and experience say about saving of array shape parameters passed in through an ENTRY statement Subroutine xyz dimension a(m,n) ...... x=a(i,j) ..... return ENTRY setup(a,m,n) return end Setup is called once from some point in the program. xyz is called many times from various points in the program, not necessarily from the same routine that calls setup. THis works on IBM 370 type systems, MVS, VM with VS Fortran compiler, at least in programs where xyz is not overlaid/reloaded. This is/was a way of improving performance by eliminating the need to pass a,m,n through all the paths needed to include it in the xyz call, and also avoiding the additional complexity of getting it done correctly. ----------------------------------------------- Reply-To: Rostyslaw Jarema Lewyckyj urjlew@ecsvax.UUCP , urjlew@unc.bitnet or urjlew@uncvm1.acs.unc.edu (ARPA,SURA,NSF etc. internet) tel. (919)-962-9107