First Program
Create a file called hello.zp:
import "std/io" { println };
fun main() Int { println("Hello, Zap!"); return 0;}Compile it with the compiler built from zap/:
./zap/build/zapc hello.zpBy default, zapc builds an executable. On Unix-like systems, if you did not pass -o, the output is a.out:
./a.outmainusually returnsInt.- Statements end with
;. - Import functions from
std/iofor console output. - If you use raw pointers or manual allocation later, compile with
--allow-unsafe.