From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,1ef3b84ca62fad7b X-Google-Attributes: gid1094ba,public X-Google-Thread: fee84,1ef3b84ca62fad7b X-Google-Attributes: gidfee84,public From: Richard Maine Subject: Re: fortran error? Date: 1998/03/20 Message-ID: #1/1 X-Deja-AN: 336131618 References: <3507A4A5.F8A7DDC2@matd.tu-graz.ac.at> <351296BC.167E@still3.chem.columbia.edu> <6euvli$m47$1@lyra.csx.cam.ac.uk> Followup-To: comp.lang.fortran Organization: NASA Dryden Newsgroups: comp.lang.fortran,comp.unix.osf.osf1 nmm1@cus.cam.ac.uk (Nick Maclaren) writes: > However, one rare construction in Fortran 77 (character concatenation) > can theoretically lead to a program with O(N) total allocated space > needing O(2^N) to run. Which is, of course, why almost all compilers > have an ad-hoc kludge or two for the space to use for that horrible > construction :-( Eh? Are you talking about standard f77 or some extension? Standard Fortran 77 goes out of its way to disallow the cases where concatenation would otherwise require dynamic allocation. This is exactly the reason for a couple of the otherwise inexplicable limitations... such as subroutine sub(c) character c*(*) character c1*10 c1 = c // "a" !-- This is ok (except for this form of commenting). call sub2( c // "a" ) !-- But this isn't. end If you know a case where standard f77 requires dynamic allocation, I'd sure like to see a sample - obscure or not. -- Richard Maine maine@altair.dfrc.nasa.gov