FALSE [IF] Code for local fvariables, loosely based upon Wil Baden's idea presented at FORML 1992. The idea is to have a fixed number of variables with fixed names. I believe the code shown here will work with any (case insensitive) ANS Forth. i/tForth users are advised to use FLOCALS| instead. The code as shown doesn't work in words that modify HERE (like CREATE) example: : test 2e 3e FRAME| a b | a f. b f. |FRAME ; test 3.0000 2.0000 ok PS: Don't forget to use |FRAME before an EXIT . [THEN] 8 constant /flocals : (frame) ( n -- ) FLOATS ALLOT ; : FRAME| 0 >r BEGIN BL WORD COUNT 1 = SWAP C@ [CHAR] | = AND 0= WHILE POSTPONE F, R> 1+ >R REPEAT /flocals R> - DUP 0< ABORT" too many flocals" POSTPONE LITERAL POSTPONE (frame) ; IMMEDIATE : |FRAME ( -- ) [ /flocals negate ] literal (frame) ; : &h HERE [ 1 FLOATS ] LITERAL - ; : &g HERE [ 2 FLOATS ] LITERAL - ; : &f HERE [ 3 FLOATS ] LITERAL - ; : &e HERE [ 4 FLOATS ] LITERAL - ; : &d HERE [ 5 FLOATS ] LITERAL - ; : &c HERE [ 6 FLOATS ] LITERAL - ; : &b HERE [ 7 FLOATS ] LITERAL - ; : &a HERE [ 8 FLOATS ] LITERAL - ; \ fetching is implicit. Use &a F! and &a F+! etc. for other things. : aa &a ; : bb &b ; : cc &c ; : dd &d ; : ee &e ; : ff &f ; : gg &g ; : hh &h ;