diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2025-01-03 00:39:09 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2025-01-03 00:39:09 +0400 |
commit | 042db745da93311f1ef02c0d232c39a08446d8b3 (patch) | |
tree | 375509e1e086b5e05a5bc9b588f28331efe33a45 | |
parent | 1040b9450512221f3fef5c134b3f227b8ebf2b18 (diff) |
new examples added
-rw-r--r-- | examples/const.gorth | 4 | ||||
-rw-r--r-- | examples/hello_world.gorth | 5 | ||||
-rw-r--r-- | examples/words.gorth | 7 |
3 files changed, 16 insertions, 0 deletions
diff --git a/examples/const.gorth b/examples/const.gorth new file mode 100644 index 0000000..fce45b8 --- /dev/null +++ b/examples/const.gorth @@ -0,0 +1,4 @@ +# Prints out the value 5 + +const CON 5 +CON dump diff --git a/examples/hello_world.gorth b/examples/hello_world.gorth new file mode 100644 index 0000000..1df3bf4 --- /dev/null +++ b/examples/hello_world.gorth @@ -0,0 +1,5 @@ +# Prints out "Hello, World!" + +include "../lib/stdlib.gorth" + +"Hello, World!" write diff --git a/examples/words.gorth b/examples/words.gorth new file mode 100644 index 0000000..b88d20e --- /dev/null +++ b/examples/words.gorth @@ -0,0 +1,7 @@ +# Prints out one + +word printOutOne + 1 dump +end + +printOutOne |