[OpenBIOS] [PATCH 7/10] Apple local variables implementation in Forth

Segher Boessenkool segher at kernel.crashing.org
Wed Aug 17 08:47:56 CEST 2011

> Right I understand this, but I'm fairly sure there is an official  
> spec for Forth local variables somewhere.

Standard (ISO/ANS) Forth (1994) has a LOCALS wordset, which is meant to
build more convenient syntaxes on, not to be used directly.  The various
locals wordsets people used at that time differed too much.

Nowadays implementations for locals have converged a bit more, and the
upcoming Forth 201x standard will most likely include a locals wordset
not unlike what Apple used, but slightly different syntax (and quite
different semantics if you look deeply!)

Gforth has similar syntax, as do many other systems.

And, of course, local variables in Forth is an abomination that should
be avoided -- just like ROLL etc. :-)


More information about the OpenBIOS mailing list