Concatenative topics
Concatenative meta
Other languages
Meta
Concatenative programs typically use the stack to store values temporarily while they perform calculations or to pass arguments from one word to another. When programmers need to store numbers more permanently, they use variables and constants.
To create a variable:
VARIABLE DATE
To store a variable:
12 DATE !
To read a variable:
DATE @
The curlies notation allow to do assignment of variables during the word definition.
: swap { a b -- b a } b a ;
This revision created on Thu, 21 Mar 2024 17:55:54 by neauoire