Hi all,
Just a general question as i explore refactoring some of my long code into smaller effiecient handlers i can call again. Am i right in thinking that only a function can return a value?
Thanks
Jalz
Handler for returning a value
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Handler for returning a value
Hi Jaz,
A handler can also return a value, but you have to retrieve THE RESULT
Example:
Hope that helps!
Best
Klaus
no Sir!Am i right in thinking that only a function can return a value?

A handler can also return a value, but you have to retrieve THE RESULT

Example:
Code: Select all
command anyhanlder
...
dothat
put the result into tReturnedValue
## Do somehting with that variable
end anyhandler
command dothat
## do something here and output the result
## Cheap-o example:
put 10*20 into tResult
RETURN tResult
end dothat
Best
Klaus
Re: Handler for returning a value
Thanks Klaus - just what i was looking for 

Re: Handler for returning a value
Hi Jalz,
Best
Klaus
I know!jalz wrote:Thanks Klaus - just what i was looking for

Best
Klaus