You. Forth. Simplicity.

git repository
download
prior releases
documentation wiki
issue tracker
mailing list and forum
irc channel and logs
try it


This wiki remains, like the original forum, mainly for historical value. There is a new wiki which, while having less content, is more secure and oriented towards modern Retro implementations.

reload node | edit | recent changes | front page

Vocabularies

You will likely have times that you will want to hide words, but access them later on. In the Rx Core, a limited form of vocabularies allows this to be accomplished. Two words are provided to create and work with named vocabularies. A simple example of a vocabulary in use is shown below.

voc: foo
foo
10 constant a
20 constant b
^
: bar foo a b ^ * . cr ;

You can open a vocabulary by calling its name. Vocabularies may be opened at any time, however only one can be open at a time. Use ^ to close the open vocabulary at any time.

TIP: If you use a . suffix on your vocabulary names, you will get a nice effect in the source, similar to dot notation in many OOP langauges.

voc: foo.
foo. : main ." main!" cr ; ^
foo. main ^

This may help improve readability if you are coming from an OOP background. Luke (docl) suggested this approach.