dos_compilers/DX-FORTH v430/HLOCALS.SCR
2024-07-09 09:07:02 -07:00

1 line
2.0 KiB
Plaintext

\ Hayes-style locals Adapted from: http://www.complang.tuwien.ac.at/forth/anslocal.fs \ Hayes-style locals [undefined] (local) [if] 1 fload locals [then] forth definitions system -? : lp >in @ swap token 2dup s" --" compare if 2dup s" }" compare over 0> and if s" |" compare 0= or false else true then else [char] } parse 2drop true then if 2drop 2drop >in @ end dup if false postpone literal then recurse swap >in ! token (local) ; : { false lp >in ! 0 0 (local) ; immediate application behead lp lp