-BUF" :" CREATE ] DOCOL
+S" :" CREATE ] DOCOL
READ-WORD CREATE
LIT DOCOL ,
]
ELSE
DROP
THEN
- AGAIN ;
+ AGAIN ; ( Yay! We now have comments! )
: UNTIL IMMEDIATE
' 0BRANCH ,
: OVER ( a b -- a b a ) SWAP DUP ROT ;
+( An alternative comment syntax. Reads until the end of the line. )
+: \ IMMEDIATE
+ BEGIN
+ KEY
+ 10 = UNTIL ;
+
( Compile the given string into the current word directly. )
: STORE-STRING ( str len -- )
BEGIN
( Read a number from standard input. )
: READ-NUMBER READ-WORD PARSE-NUMBER ;
+S" Ready." TELL NEWLINE
+
( vim: syntax=forth
)