Returning values

Home of the ABS programming language: the joy of shell scripting.

Returning values

We promise, this is going to be short!

Returning values is done through the return keyword:

return "hello world"

Note that functions allow implicit returns, so you don’t need to explicitely use a return:

func = f(x) {
    x + 1

func(9) # 10

The default value of a return is null:

if x {
    return # null


That’s about it for this section!

You can now head over to read about if expressions.