Home
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Details for command return:
* return {<value>};
When you use callsub or callfunc, this command allows you to go back to the
calling script. You can optionally return with a value telling the calling
program what exactly happened. To get at this value, you will have to use the
'set' command:
set <variable>,callfunc "<your function>"
Note the round brackets. Turns out you have to enclose just about anything in
brackets if it isn't a straight number for the return command to work with it:
return (@x+@y);
Also note that
if (<condition>) return (<whatever>);
does NOT always work, even though it would make scripts a lot cleaner, and it
might be wiser to avoid using it like that.
For an example see 'callfunc' and 'callsub'