Xref: utzoo comp.lang.fortran:680 comp.software-eng:590 Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.fortran,comp.software-eng Subject: Re: Fortran follies Summary: there is a proper way to do this Message-ID: <1005@cresswell.quintus.UUCP> Date: 21 May 88 08:24:48 GMT References: <5377@cup.portal.com> <2852@mmintl.UUCP> Organization: Quintus Computer Systems, Mountain View, CA Lines: 13 In article <2852@mmintl.UUCP>, franka@mmintl.UUCP (Frank Adams) writes: > In article <5377@cup.portal.com> Paul_L_Schauble@cup.portal.com writes: > > real a(1), b(1) <-- note dimensions > > I would recommend that you regard a dimension of 1 for an argument as > meaning that the dimension is undefined. It's not pretty, but it works. This has never been strictly legal. Fortran 77, unless I am much mistaken, has a "proper" way of doing it: the last (and only the last) dimension of a formal array parameter may be '*'. So this declaration should read real a(*), b(*) A Fortran compiler is entitled to generate code to check the actual subscripts against the declared dimensions.