Stephen Cox wrote:
Wait. I don't get this. You saying that checking if an unused variable is
empty returns false? Does revolution put some data in a variable when
created?

Sort of, but only in specific cases, which is mostly a side-effect of how friendly Rev's interpreter is and how it deals with strings. (The discussion about quoted field names shows how flexible Rev is with strings.) If a variable is not specifically created with a value, the value of the variable is the variable's name itself.

This creates a variable without assigning it any value:

on mouseup
 put (var = empty) && "Var = " & var
end mouseup

You get: false var = var

But this assigns a value and gives what you'd expect:

on mouseUp
 put empty into var
 put (var = empty) && "Var = " & var
end mouseUp

Gives: true var =

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to