aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorc+12023-05-10 00:50:10 -0400
committerc+12023-05-10 00:50:10 -0400
commit266d3d6af1ba8d338bb8b9ad09431483276dae46 (patch)
tree4c4ce456e9c1bfc6e0fdc370dffa5da82d797868 /examples
parentdeb8d97be58847031e7f4ef25d7107cb2dbc35a3 (diff)
halk.
Diffstat (limited to 'examples')
-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 ->
+}