value  ( comp: n -- <valname> | exec: -- n )

published: 9 January 2022 / updated 18 January 2022

Lire cette page en français

 

vocabulary: forth

Define value.

valname leave value on stack.

A Value behaves like a Constant, but it can be changed.

Example:

12 value APPLES     \ Define APPLES with an initial value of 12 
34 to APPLES        \ Change the value of APPLES. to is a parsing word 
APPLES              \ puts 34 on the top of the stack 

Legal: site web personnel sans commerce / personal site without seling