Documentation

#RESULT

Added in v2.12

RESULT

Syntax: #RESULT value
Related: #RETURN, #FUNCTION

Must be used within a function - sets the value to be returned by that function without exiting the function. To set the return value and exit, see the #RETURN command.

RESULT Example

#FUNCTION MySum($a,$b) {#RESULT ($a+$b)}
Creates a function that returns the sum of it's given two arguments. For example, @MySum(1,3) would return the value of 4.

#FUNCTION Example

The #SAY command is executed and "a value" is returned as the function result.

Add comment

Login or register to post comments