push >r

Move one value from the data stack to the return stack.

Forth uses two stacks, the data stack and the return stack. Most operations occur on the data stack. The return stack can be crucial when reaching below the top two data stack elements, or to put aside values. In traditional Forth, the return stack does, double duty, being used to track the return address of the current caller of a word. As such, it is important to balance what you push and pop to the return stack within each scope. The current Haiku Forth implement does not use the return stack for flow control, however, this behavior may change in future versions.

In tranditional Forth, this word is called >r to visually illustrate how data flows to the return stack. The variant push (from colorForth) is supported as this form is more conducive to cell phone entry.

NOTE: In Haiku Forth (unlike Traditional Forth), all stack cells and memory locations are floating point numbers.

Examples:

Forth Haiku Glossary