RosettaCodeData/Task/Stack/Oforth/stack-2.fth

12 lines
197 B
Forth

: testStack
| s |
Stack new ->s
s push(10)
s push(11)
s push(12)
s top println
s pop println
s pop println
s pop println
s isEmpty ifTrue: [ "Stack is empty" println ] ;