Path: utzoo!attcan!uunet!husc6!rice!titan!david From: david@titan.rice.edu (David Callahan) Newsgroups: comp.lang.fortran Subject: Re: Fortran follies Message-ID: <705@thalia.rice.edu> Date: 18 May 88 19:35:34 GMT References: <5377@cup.portal.com> <50500052@uxe.cso.uiuc.edu> Sender: usenet@rice.edu Reply-To: david@titan.UUCP (David Callahan) Organization: Rice University, Houston Lines: 34 In article <50500052@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes: > >Actually, consider this example: > > real x(100000) > call sub(1000, x(1),x(10000),x(20000)) > ... > > subroutine sub(n,x,y,z) > dimension x(n), y(n), z(n) > do 1 i= 1,n >1 z(i)= x(i)+y(i) > end > >This had also better work. I THINK that it is even legal. >Doug McDonald Very common (probably essential to making libraries) but not legal; "15.9.3.6 Restrictions on Assoication of Entities. If a subprogram reference causes a dummy argument in the referenced subprogram to become associated with another dummy argument in the referenced subprogram, neither dummy argument may become defined during execution of that subprogram. For example, if a subroutine is headed by SUBROUTINE XYZ(A,B) and is referend by CALL XYZ (C,C) then the dummy arguments A and B each become associated with the same acutal argument C and therefore with each other. Neither A nor B may become defined during this execution of the subroutine XYZ or by any procedure referend by ZYX." david callahan