151786Sdcs\ ** ficl/softwords/ficllocal.fr
251786Sdcs\ ** stack comment style local syntax...
351786Sdcs\ {{ a b c -- d e }}
451786Sdcs\ variables before the "--" are initialized in reverse order
551786Sdcs\ from the stack. Those after the "--" are zero initialized
651786Sdcs\ Uses locals...
751786Sdcs\ locstate: 0 = looking for -- or }}
851786Sdcs\           1 = found --
951786Sdcs\
1051786Sdcs\ $FreeBSD: releng/11.0/sys/boot/ficl/softwords/ficllocal.fr 51786 1999-09-29 04:43:16Z dcs $
1151786Sdcs
1251786Sdcshide
1351786Sdcs0 constant zero
1451786Sdcs
1551786Sdcs: ?--   s" --" compare 0= ;
1651786Sdcs: ?}}   s" }}" compare 0= ;
1751786Sdcs
1851786Sdcsset-current
1951786Sdcs
2051786Sdcs: {{
2151786Sdcs    0 dup  locals| nLocs locstate |
2251786Sdcs    begin
2351786Sdcs        parse-word 
2451786Sdcs        ?dup 0= abort" Error: out of text without seeing }}"
2551786Sdcs        2dup 2dup  ?-- -rot ?}} or 0=
2651786Sdcs    while
2751786Sdcs        nLocs 1+ to nLocs
2851786Sdcs    repeat
2951786Sdcs
3051786Sdcs    ?-- if 1 to locstate endif
3151786Sdcs
3251786Sdcs    nLocs 0 do
3351786Sdcs        (local) 
3451786Sdcs    loop
3551786Sdcs
3651786Sdcs    locstate 1 = if
3751786Sdcs        begin
3851786Sdcs            parse-word
3951786Sdcs            2dup ?}} 0=
4051786Sdcs        while
4151786Sdcs            postpone zero  (local)
4251786Sdcs        repeat
4351786Sdcs        2drop
4451786Sdcs    endif
4551786Sdcs
4651786Sdcs    0 0 (local)
4751786Sdcs; immediate compile-only
4851786Sdcs 
4951786Sdcsprevious
50