Lingo Dictionary > O-R > result |
![]() ![]() ![]() |
result
Syntax
the result
Description
Function; displays the value of the return expression from the last handler executed.
The result
function is useful for obtaining values from movies that are playing in windows and tracking Lingo's progress by displaying results of handlers in the Message window as the movie plays.
This function has no effect in the Director player for Java.
To return a result from a handler, assign the result to a variable and then check the variable's value. Use a statement such as set myVariable =
function()
, where function
()
is the name of a specific function.
Example
The following handler returns a random roll for two dice:
on diceRoll return random(6) + random(6) end
Example
The two statements
diceRoll roll = the result
are equivalent to this statement:
set roll = diceRoll()
Note that set roll = diceRoll
would not call the handler because there are no parentheses following diceRoll
; diceRoll
here is considered a variable reference.
See also
![]() ![]() ![]() |