Previous Section Headers
3.3.2.5 Local Workspace
Nearly all local workspace declared in individual routines is stack-based
such that variables declared local to a given subroutine exist only during
the lifetime of that routine, disappearing upon execution of the return
statement. This approach has the advantage of allowing the user to declare
workspace wherever it is required, without having to worry about clobbering
space that another routine needs. A stack-based memory management scheme
is vital for multitasking considerations. This topic is discussed in more
detail in "Multitasking Strategy" .
Space for locally declared variables is allocated statically (i.e. not
on the stack) only for those variables which are initialized with a data
statement, or explicitly mentioned in a save statement. When
a variable is allocated statically, its value is preserved between calls
to the routine in which it is declared.
Search page
Questions on these pages can be sent to...
erik@ucar.edu .
$Name: ccm3_6_6_latest2 $ $Revision: 1.33.2.1 $ $Date: 1999/03/25 21:38:29 $ $Author: erik $