diff --git a/examples/greeter.sb b/examples/greeter.sb index 1c8a654..1888a78 100644 --- a/examples/greeter.sb +++ b/examples/greeter.sb @@ -4,4 +4,4 @@ fn main() { fn greet(name) { return "Hello " + name -} \ No newline at end of file +} diff --git a/lib/stdio.sb b/lib/stdio.sb index 720a7ee..34b0b7a 100644 --- a/lib/stdio.sb +++ b/lib/stdio.sb @@ -1,3 +1,10 @@ +// Raw wrapper around _printf builtin function. +// Writes the given content to stdout fn print(msg) { - _printf(msg + "\n") + _printf(msg) +} + +// Like print(), but with an extra newline ('\n') character +fn println(msg) { + print(msg + "\n") } \ No newline at end of file