Path: utzoo!utgpu!attcan!uunet!husc6!purdue!i.cc.purdue.edu!h.cc.purdue.edu!ags
From: ags@h.cc.purdue.edu (Dave Seaman)
Newsgroups: comp.lang.fortran
Subject: Re: Maximum Stack Size for a Subprog.?
Message-ID: <3874@h.cc.purdue.edu>
Date: 11 Aug 88 14:30:26 GMT
References: <47900003@uicsrd.csrd.uiuc.edu> <50500062@uxe.cso.uiuc.edu> <271@quintus.UUCP>
Reply-To: ags@h.cc.purdue.edu.UUCP (Dave Seaman)
Organization: Purdue University
Lines: 22

In article <271@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes:
 [Re:  lack of "stack" concept in standard Fortran]

>Trivia point:  in Fortran 66 this applied to COMMON blocks as well.
>If a COMMON block was not statically initialised, it was permissible
>for a compiler to arrange for it to be allocated as soon as a routine
>mentioning it was entered, and deallocated when that routine exited
>(this might be a different routine each time).  So, for example, you
>could arrange overlays of COMMON blocks quite legally, though a
>compiler was not required to support this.  Does anyone know of any
>Fortran compiler which _didn't_ allocate COMMON blocks statically?

Why the past tense?  It is still true in Fortran 77 that labeled COMMON
blocks can become undefined when a routine exits.  The difference is that
Fortran 77 provides two ways  for the programmer to prevent this from
happening (declare the COMMON block in the main program or use SAVE
statements), whereas Fortran 66 provided only one way (declare the COMMON
block in the main program).

-- 
Dave Seaman	  					
ags@j.cc.purdue.edu