previous up next
Go backward to Modules
Go up to Top
Go forward to Orthagonality
RISC-Linz logo

Classes

SIMULA, C++.

class STACK-OF-(X) =
    record
        begin
            var ST: array [1..k] of nat;
            var TOP: nat
        within
            proc PUSH(l: nat) = ...
            proc POP = ...
            fcn TOP = ...
            proc INITIALIZE = ...
        end
    end

var A: STACK-OF(nat)

Classes are record type abstracts that enclose declaration blocks.

(Storage is allocated when class variable is defined.)


Author: Wolfgang Schreiner
Last Modification: December 18, 1997

previous up next