Path: utzoo!attcan!uunet!snorkelwacker!usc!ucsd!ucbvax!pasteur!euler.Berkeley.EDU!ndeng From: ndeng@euler.Berkeley.EDU Newsgroups: comp.lang.fortran Subject: Re: passing DIMs via COMMON?? Message-ID: <28709@pasteur.Berkeley.EDU> Date: 11 Oct 90 21:04:02 GMT References: Sender: news@pasteur.Berkeley.EDU Reply-To: ndeng@euler.Berkeley.EDU.UUCP () Distribution: comp Organization: University of California, Berkeley Lines: 28 In article burley@world.std.com (James C Burley) writes: >In article martin@slsiris.harvard.edu (Mr. Science) writes: [stuff deleted] > SUBROUTINE X(A) > INTEGER A(N) > COMMON /FOO/N > ... SOme compliers will break for the above. But my experience is, if you change the sequence of INTEGER and COMMON statements, most compiler will accept it. The following works everytime to me: subroutine x(a) common /foo/ n integer a(n) ... Of course, you need to specify the value of the variable n before this subroutine is called. >This is, I believe, standard for ANSI 77. > >Whether a particular implementation (such as f77) supports it is another >issue! > >James Craig Burley, Software Craftsperson burley@world.std.com