merge() only evaluating first expression?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

merge() only evaluating first expression?

** Clarence P Martin ** via use-livecode
Before I file the bug report, I want to check that this is an error (or am
I missing something

I have the custom property  blElQry with value

SELECT kywd FROM [[dhtbl_dat]] WHERE kywd LIKE '[[the leadFdWc of srcRw]]%'
ESCAPE '\' ORDER BY kywd

However, the single quote appears to be blocking evaluation of the second
bracketed term; the first is correctly taken from a variable, but the
second retains that literal text.

I don't  believe that LiveCode should be treating a single-quoted range as
a literal in merge(), should it?

For that matter, nothing in the dictionary suggests that a double-quoted
string would be exempt from valuation.
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: merge() only evaluating first expression?

** Clarence P Martin ** via use-livecode
If you evaluate the second expression in that merge in the context (i.e. Same handler) of the call to merge does it throw an error?

If a compile or runtime error occurs in any [[ ... ]] bracketed part of the merge string, then it gets rendered literally and not the value of it (as it can't be evaluated).

Warmest Regards,

Mark.

Sent from my iPhone

> On 2 Aug 2017, at 21:02, Dr. Hawkins via use-livecode <[hidden email]> wrote:
>
> Before I file the bug report, I want to check that this is an error (or am
> I missing something
>
> I have the custom property  blElQry with value
>
> SELECT kywd FROM [[dhtbl_dat]] WHERE kywd LIKE '[[the leadFdWc of srcRw]]%'
> ESCAPE '\' ORDER BY kywd
>
> However, the single quote appears to be blocking evaluation of the second
> bracketed term; the first is correctly taken from a variable, but the
> second retains that literal text.
>
> I don't  believe that LiveCode should be treating a single-quoted range as
> a literal in merge(), should it?
>
> For that matter, nothing in the dictionary suggests that a double-quoted
> string would be exempt from valuation.
> --
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: merge() only evaluating first expression?

** Clarence P Martin ** via use-livecode
On Wed, Aug 2, 2017 at 1:00 PM, Mark Waddingham via use-livecode <
[hidden email]> wrote:

> If you evaluate the second expression in that merge in the context (i.e.
> Same handler) of the call to merge does it throw an error?
>

Ahh, it was viciously subtle (and visibly taunting)

In this routine, I had used "srcRr" in the way I often use "srcRw" (it's a
source row), probably over variable name/custom property collisions.

And I'm in need of a stronger eyeball prescription and couldn't tell them
apart!

Thanks so much (now to go scoop my hair back from the floor and glue it  on
my head . . )

--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...