aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.halk
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello.halk')
-rw-r--r--examples/hello.halk18
1 files changed, 13 insertions, 5 deletions
diff --git a/examples/hello.halk b/examples/hello.halk
index a7c7ed5..cfa07f7 100644
--- a/examples/hello.halk
+++ b/examples/hello.halk
@@ -1,6 +1,14 @@
-[hello world in HALK.]
-let it = "Hello, World!";
+[comments in square brackets]
-fn main = /
- say it;
-\
+[preprocessor directives]
+#INCLUDE 'math.halk'; [looks for a 'math' file in cwd, then ~/halk/include]
+#INCLUDE 'io' AS ''; [bring everything in 'io' into global scope]
+
+
+
+let. hello => 'hello, '; [variables must be given a value at declaration]
+ [constants are denoted with a '=>']
+
+let. say_hello.to -> {
+ let.greeting ->
+}