<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In Compilation Words in TurboForth Kernal
Defines a VALUE using the name immediately following in the terminal input buffer with the value n.
10 VALUE TEN
: TEST ( -- ) TEN . ;
At run time, when the name of the VALUE is encountered, its value shall be pushed to the stack.
VALUEs when created expect their initial value to be on the stack.
Use TO and +TO to modify the value. VALUEs should not be defined within a colon definition.
To reference the value in code, simply refer to it by name.