X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_read_word.adoc;h=76bb0e60789c9c8c826559616d6e28bfb42ba587;hb=4a6f8e4302c3112badc2d23e878f6d28d024cd9b;hp=f917434f55980efb848c8183f30beaa3adaa75be;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_read_word.adoc b/adoc/p_read_word.adoc index f917434..76bb0e6 100644 --- a/adoc/p_read_word.adoc +++ b/adoc/p_read_word.adoc @@ -1,9 +1,15 @@ +// stdio.asm: WORD p_read_word,'READ-WORD',fasm + anchor:p_read_word[] -Word: READ-WORD ---------------- +=== Word: READ-WORD +.... +Data stack: ( stream -- char* n ) +.... ----- -stdio.asm: WORD p_read_word,'READ-WORD',fasm ----- +"READ-WORD" is a function word that "reads" the next whitespace +separated word from the given stream and returns the [n:char*] duoble +cell pointer for it. The characters of the word are copied to +<>, and there is a limit of 1024 characters. +At the end of the stream READ-WORD returns 0 length.