On Apr 21, 10:38 am, m_l_g3 <m_l...@[EMAIL PROTECTED]
> wrote:
> An alternative is
> : N-HERE N-DP @[EMAIL PROTECTED]
;;
> : N-ALLOT N-DP +! ;
> etc.
> I do not know which one is best (a global switch or wordset
> duplication).
If the header space is only used for headers, and builds down toward
the codespace, would you need an N-ALLOT? For ALLOT-HEADER, it looks
to me like maybe you just need LAST-NAME and THIS-NAME ...
: ALLOT-HEADER ( -- ) LAST-NAME @[EMAIL PROTECTED]
HEADER-SIZE - THIS-NAME ! ;
.... with mingled headers, maybe ...
: ALLOT-HEADER ( -- ) HERE THIS-NAME ! HEADER-SIZE ALLOT ;
.... but I'll note that hForth has a compact wordset that works for
both mingled and separate headers, so if doing it from scratch, I'd
use that wordset.


|