Return expression not allowed

In a function without a return type, you cannot return an expression to the caller of the function. You can use the return keyword to exit immediately from the function, but without an expression.

func test()
  return 3   ; Error!
endfunc

func test2()
  return     ; OK
endfunc

See Also
Errors