Function / Sub
Subroutine definition.
Syntax
Function name(p) ... name = ... End Function
Description
Function returns a value (name = result); Sub does not return one. The return value is assigned to the function's name.
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.