diff options
author | c+1 | 2023-05-10 00:50:10 -0400 |
---|---|---|
committer | c+1 | 2023-05-10 00:50:10 -0400 |
commit | 266d3d6af1ba8d338bb8b9ad09431483276dae46 (patch) | |
tree | 4c4ce456e9c1bfc6e0fdc370dffa5da82d797868 /examples | |
parent | deb8d97be58847031e7f4ef25d7107cb2dbc35a3 (diff) |
halk.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/hello.halk | 18 |
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 -> +} |