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!
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: qualification.tex,v 1.2 1996/05/02 11:53:49 schreine Exp schreine