From: Richard Maine <maine@altair.dfrc.nasa.gov>
Subject: Re: fortran error?
Date: 1998/03/20 [thread overview]
Message-ID: <ueemzwvr59.fsf@altair.dfrc.nasa.gov> (raw)
In-Reply-To: 6euvli$m47$1@lyra.csx.cam.ac.uk
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
next prev parent reply other threads:[~1998-03-20 5:00 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-12 5:00 fortran error? Armin Leuprecht
1998-03-12 5:00 ` robin
1998-03-16 5:00 ` Steve Lionel
1998-03-17 5:00 ` Peter Shenkin
1998-03-17 5:00 ` Craig Burley
1998-03-17 5:00 ` Peter Shenkin
1998-03-18 5:00 ` Craig Burley
1998-03-19 5:00 ` Peter Shenkin
1998-03-19 5:00 ` Craig Burley
1998-03-20 5:00 ` Nick Maclaren
1998-03-20 5:00 ` Peter Shenkin
1998-03-20 5:00 ` Craig Burley
1998-03-20 5:00 ` Peter Shenkin
1998-03-23 5:00 ` Craig Burley
1998-03-23 5:00 ` Summary (I hope) failure of automatic allocation; was, " Peter Shenkin
1998-03-24 5:00 ` Craig Burley
1998-03-23 5:00 ` Craig Burley
1998-03-23 5:00 ` Peter Shenkin
1998-03-24 5:00 ` Craig Burley
1998-03-24 5:00 ` Nick Maclaren
1998-03-20 5:00 ` Nick Maclaren
1998-03-20 5:00 ` Richard Maine [this message]
1998-03-20 5:00 ` Richard Maine
1998-03-20 5:00 ` Dick Hendrickson
1998-03-20 5:00 ` Craig Burley
1998-03-20 5:00 ` Peter Shenkin
1998-03-23 5:00 ` Craig Burley
1998-03-20 5:00 ` Peter Shenkin
1998-03-18 5:00 ` Toon Moene
1998-03-18 5:00 ` Jeff Drummond
1998-03-19 5:00 ` Peter Shenkin
1998-03-18 5:00 ` Steve Lionel
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox