Go backward to
Extent in Other Block Forms
Go up to
Top
Go forward to
Type Structure Blocks
Declaration Blocks
Hide details about implementation of a structure.
module
GLOBAL-STACK
=
begin
var
CTR:
newint
,
var
STACK:
array
[1...100]
of newint
in
proc
PUSH
(
X
:
intexp
) = ...
proc
POP
= ...
fun
TOP
= ...
proc
INIT
=
CTR
:=0
end
Stack allocated on module definition.
Body of declaration block made visible:
import
GLOBAL-STACK
in call
INIT
;
call
PUSH(0)
; ...
Stack variable alive but not in scope!
Author:
Wolfgang Schreiner
Last Modification: May 14, 1998