|
From: David Thompson on 5 May 2008 00:10 On Tue, 22 Apr 2008 15:18:31 -0700 (PDT), Terence <spamtrap(a)crayne.org> wrote: > On Apr 22, 5:42�pm, Josef Moellers <spamt...(a)crayne.org> wrote: > > >.... But I recall that for one, Fortran doesn't support > > recursion, and, as Robert pointed out, not all early machines had a > > proper stack, parameters might be passed in a fixed location. > > > > The best thing to do would be to compile a Fortran program and look at > > the object code. > > For the particular compiler(s?), and possibly options, of interest. > > Oh NO!, Fortran DOES support recursion! Since 1990, but it's still not the default. Compilers legally _can_ still use single-copy (static) storage for routines not attributed RECURSIVE. But since most CPUs nowadays support stack access at least as efficient as static, there's rarely any longer a benefit to it. Also variables declared with initialization are implicitly attributed (also) SAVE, meaning single-copy even in a RECURSIVE routine. To have 'local' (per invocation) variables, you must use assignment instead. This is a FAQ on c.l.fortran. - formerly david.thompson1 || achar(64) || worldnet.att.net
First
|
Prev
|
Pages: 1 2 3 4 Prev: Linking TASM objs with current C++ stuff and linkers Next: Port binding under linux in ASM |