dos_compilers/DX-FORTH v430/HLOCALS.SCR

1 line
2.0 KiB
Plaintext
Raw Permalink Normal View History

2024-07-09 18:07:02 +02:00
\ 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