ErosOlmi
06-01-2008, 12:59
Current version of thinBasic (1.5.0.1) has RETURN keyword. RETURN [any value] is one of the possible ways to get back a value from a function.
Petr suggested to use RETURN keyword like in C where RETURN exits immediately from the currently executing function to the calling routine, optionally returning a value. So something like:
FUNCTION = [any value]
EXIT FUNCTION
I'm still considering if the return value will be mandatory and not optional so if
RETURN expression / value
or
RETURN [expression / value]
Ciao
Eros
Petr suggested to use RETURN keyword like in C where RETURN exits immediately from the currently executing function to the calling routine, optionally returning a value. So something like:
FUNCTION = [any value]
EXIT FUNCTION
I'm still considering if the return value will be mandatory and not optional so if
RETURN expression / value
or
RETURN [expression / value]
Ciao
Eros