"Mark Wills" <markrobertwills@yahoo
.co.uk> wrote in message
> I think I may have asked this before, but the google search function
> appears to be a little flaky tonight. Should HEX and DECIMAL be
> I don't think they're core words (though DECIMAL is defined (as non-
> immediate)) in Forth 83.
> Thing is, if (for example) HEX wasn't immediate, then you couldn't
> compile the following code:
> : TEST HEX DEAD BEEF FACE DECIMAL ;
> Because they wouldn't be parsed as numbers. They'd be parsed as words.
If HEX is not immediate, then all it would do is change the type of numbers
accepted by, ... what? ..., NUMBER or >NUMBER or something in the compile
loop portion of the inner interpreter, yes? So, what happens when a word is
not found? Doesn't the inner interpreter attempt to convert everything not
found to a number before it rejects it as not found? If so, then DEAD and
BEEF should be accepted as numbers by NUMBER or >NUMBER, or so I'd like to
think, since HEX would tell the number routine to accept HEX numbers ...