]> code.bitgloo.com Git - bitgloo/alee-forth.git/commitdiff
CHAR return zero on no input
authorClyne Sullivan <clyne@bitgloo.com>
Mon, 13 Nov 2023 14:07:14 +0000 (09:07 -0500)
committerClyne Sullivan <clyne@bitgloo.com>
Mon, 13 Nov 2023 14:07:14 +0000 (09:07 -0500)
forth/core.fth

index 4ab67211af93e0c4e377e690b5523dc83eb06d62..d198583a96ee1dc2dbe527a1921ab28c07e5c456 100644 (file)
            2dup <> while rot repeat
            2drop here - here c! here ;
 : count    dup char+ swap c@ ;
-: char     bl word char+ c@ ;
+: char     0 here char+ c! bl word char+ c@ ;
 : [char]   char postpone literal ; imm
 
 : (        begin [char] ) key <> while repeat ; imm