Class "stack"
A stack implementation using a filehash
database
Objects can be created by calls of the form new("stack", ...)
or
by calling createS
. Existing queues can be initialized with
initS
.
stack
:Object of class "filehashDB1"
name
:Object of class "character"
: the name of
the stack (default is the file name in which the stack data are
stored)
signature(db = "stack")
: returns
TRUE
/FALSE
depending on whether there are elements
in the stack.
signature(db = "stack")
: returns the value of the
top of the stack and subsequently removes that
element from the stack; an error is signaled if the stack is empty
signature(db = "stack")
: adds an element to the
top of the stack
signature(object = "stack")
: prints the name of
the stack
signature(db = "stack")
: returns the value of the
top of the stack; an error is signaled if the stack
is empty
signature(db = "stack")
: works like push
except it can push multiple objects in a list on to the stack
Roger D. Peng rpeng@jhsph.edu
showClass("stack")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.