By the way, off topic a bit:

Wouldn't "I" && "am" be the same as "I " & "am"? ((notice the space after
"I" in the second example")).


On 5/9/09 12:57 PM, "J. Landman Gay" <jac...@hyperactivesw.com> wrote:

> 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 =

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to