From 266d3d6af1ba8d338bb8b9ad09431483276dae46 Mon Sep 17 00:00:00 2001 From: c+1 Date: Wed, 10 May 2023 00:50:10 -0400 Subject: halk. --- examples/hello.halk | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'examples') 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 -> +} -- cgit v1.2.3