Stack class? - Smalltalk
This is a discussion on Stack class? - Smalltalk ; Hi,
I was just looking for a Stack (pop, push ...) class in the image,
didn't find one.
Isn't there one, or is it just named differently?
Günther...
-
Stack class?
Hi,
I was just looking for a Stack (pop, push ...) class in the image,
didn't find one.
Isn't there one, or is it just named differently?
Günther
-
Re: Stack class?
>I was just looking for a Stack (pop, push ...) class in the image,
>didn't find one.
>
>Isn't there one, or is it just named differently?
I just use an OrderedCollection....
oc := OrderedCollection new.
oc addLast: something.
.....
tos := oc removeLast
You can wrap it up in a "Stack" class but it seems a bit pointless.
Apart from some bounds checking there's not a lot more you can do with a
Stack is there :-)
--
Ian
The from address is (currently) valid