Make Forth example actually *print* the string
The previous example didn't actually print anything, it just defined a "word" (function) called `HELLO` and never called it. You could either call the function (just add `HELLO` on a new line), but more simply and idiomatically for just printing something you can use `.( string)` which I've done here. You can try this in an online Forth REPL at https://repl.it/languages/forth
This commit is contained in:
@@ -1 +1 @@
|
||||
: HELLO ." Hello, world!" CR ;
|
||||
.( Hello, world!)
|
||||
|
||||
Reference in New Issue
Block a user