[TAO] value() to obtain pointer functionality

Peter Haworth pete at lcsql.com
Sun Aug 3 13:25:12 EDT 2014


Hi Richard,
Just tried it with an arithmetic expression and it generated the same
error, with or without parens.

I'll say again, since it seems to be causing some confusion, the parens
aren't really the issue other than they should force the expression between
them to be evaluated before the rest of the statement.

I originally tried this without parens, got the error, then added the
parens.  Also tried value("abc" & "def").

However, it looks like if the compiler sees any character that is not valid
as part of a custom property name, it flags an error instead of checking to
see if it is part of an expression to be evaluated. Hence the need for a do
statement or, as Jacque pointed out, putting the expression into a variable

I've entered QCC report# 13086 on this.  Even if it's not accepted as a
bug, it will be interesting to discover why it works this way.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>


On Sat, 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.
>
> Does it only fail with concatenated expressions, or any others?
>
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for Desktop, Mobile, and Web
>  ____________________________________________________________
>  Ambassador at FourthWorld.com        http://www.FourthWorld.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list