The most obvious feature of Forth is the stack. When you type in a
number, it is pushed on the stack. You can display the contents of the
stack with .s
.
.s
displays the top-of-stack to the right, i.e., the numbers
appear in .s
output as they appeared in the input.
You can print the top element of the stack with .
.
In general, words consume their stack arguments (.s
is an
exception).
Assignment: What does the stack contain after
5 6 7 .
?