Quick Forth Question
ard at p850ug1.demon.co.uk
Tue Jan 24 12:50:02 CST 2006
> That's odd.
> Usually ." Hello, world." words on all forths.
Watch out. In some Forths, ." can only be used inside a colon definition,
not in the imput like (you get some very odd effects, possibly even a
crash if you try). I used to know the reason for this, something about it
needing to allocate space for the string.
At least one Forth used " rather than ." too.
> Keep in mind you do need the space between ." and the first letter of
> the string, since ." is a word (a "parsing" word since it reads ahead in
> the stream till the ending ")
But there does not need to be a space before the closing quote (if there
is one, it will be output as part of the string)
> Might help. Sometimes you can also type WORDS at the command prompt and
> see all the words.
VLIST (stands for Vocabulary List) is another word some FORTHs use for this.
More information about the cctalk