FUNCTION / RETURN
Subroutine that returns a value.
Syntax
FUNCTION name(p) ... RETURN value
Description
Defined with FUNCTION, returns a value with RETURN. PROCEDURE does not return a value.
Example
Loading editor…
This language is for reference/learning only — copy the code and try it in your own environment.
Expected output
25
When to use?
Preventing code repetition.