version 1.1, 1996/01/25 16:47:05
|
version 1.3, 1997/06/06 17:28:12
|
Line 10
|
Line 10
|
\ it and 2) it's unnecessary; just put a 0 before the "{" for every |
\ it and 2) it's unnecessary; just put a 0 before the "{" for every |
\ additional local you want to declare. |
\ additional local you want to declare. |
|
|
\ This program uses PARSE from the core ext and COMPARE from the |
\ The program uses the following words |
\ string wordsets |
\ from CORE : |
|
\ : bl word count ; >in @ 2dup 0= IF 2drop [char] ELSE THEN drop |
|
\ recurse swap ! immediate |
|
\ from CORE-EXT : |
|
\ parse true |
|
\ from BLOCK-EXT : |
|
\ \ |
|
\ from FILE : |
|
\ ( S" |
|
\ from LOCAL : |
|
\ (local) |
|
\ from STRING : |
|
\ compare |
|
|
: local ( "name" -- ) |
: local ( "name" -- ) |
bl word count (local) ; |
bl word count (local) ; |
|
|
: {helper ( -- final-offset ) |
: {helper ( -- final-offset ) |
>in @ |
>in @ |
bl parse |
bl word count |
2dup s" --" compare 0= if |
2dup s" --" compare 0= if |
2drop [char] } parse 2drop true |
2drop [char] } parse 2drop true |
else |
else |