[TAO] value() to obtain pointer functionality

Jerry Jensen jhj at jhj.com
Sat Aug 2 23:56:34 EDT 2014


On Aug 2, 2014, at 8:09 PM, Richard Gaskin <ambassador at fourthworld.com> wrote:
> Peter Haworth wrote:
> 
>> Just about any expression causes an error, eg:
>> 
>> set the ("abc" & "def") of button "xyz" to 10
> 
> String literals are also expressions, which is what threw me off.
> 
> What we have here seems like a case where the engine isn't doing a proper up-front evaluation of the stuff between parens, which I'd consider a bug.

Interesting situation. The dictionary says what goes after the word "the" is the name of the cprop. I'm not sure if a value (the result of evaluating an expression) qualifies as a "name". If evaluation doesn't occur there, why can a bare variable be used successfully? Its inconsistent. 

I think whats needed is an enhancement request to evaluate an expression there. Not knowing anything about the engine internals, I simply am guessing it shouldn't be too difficult. <grin>

Maybe the messy syntax of an unquoted literal being a legal literal if its not a variable name (except in strict compilation mode) is handled in a different part of the engine.
Yet another reason to use strict compilation mode. Amen.

.Jerry





More information about the use-livecode mailing list