Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: Fortran follies Message-ID: <50500052@uxe.cso.uiuc.edu> Date: 14 May 88 19:58:00 GMT References: <5377@cup.portal.com> Lines: 28 Nf-ID: #R:cup.portal.com:5377:uxe.cso.uiuc.edu:50500052:000:944 Nf-From: uxe.cso.uiuc.edu!mcdonald May 14 14:58:00 1988 (not including the examples, which are long) The second program is not only illegal, it is horrible practice and you ought to forget about it. The first one, though, you had better get to work right. Dimensioning things "1" when they are passed as arguments is extremely common. I just read the appropriate sections of the F77 standard, and I can't tell if it is legal. But if your compiler won't work on it, your customers have a good reason to be mad. Why can't the compiler tell how big the arrays are, hence how big any temporary storage needs to be, from the index range of the DO loop? If it can't, it is pretty stupid. 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