aboutsummaryrefslogtreecommitdiff
path: root/examples/v2.halk
blob: c116ed72100df1fd58eaf48ebcddafe7b3395381 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
` new syntax `

#include."IO.halk";           ` preprocessor directives start with '#' and end with ';' `
#macro."PI","3.14159";        ` replace every instance of PI with 3.14159 `


` mut:?<some type>:<some name> = <some value>; `

str:hello = "Hello";          ` by default, variables are immutable `
mut:str:world = "world"       ` one can create an immutable variable with mut: `

void:say_hello.str:to = {     ` functions need no special keyword `
   io.stdout.to;        
}