Re: The merge function is redundant?

2019-01-18 Thread prothero--- via use-livecode
Folks: I’m looking at Jan Schenkel’s posting on the “Power of Merge”. I can’t make any of the examples work. Obviously, there is some code or some very basic thing that everybody (but me) knows, but ?? Please illuminate me. I see the placeholder in some of the lessons. The dictionary is no

Re: The merge function is redundant?

2019-01-18 Thread kee nethery via use-livecode
Thanks everyone. Templates makes sense. Just for grins, perhaps the dictionary entry could be enhanced with Jacque’s example. It makes sense to me now. Kee ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to

Re: The merge function is redundant?

2019-01-18 Thread Andre Alves Garzia via use-livecode
Kee, I can spend hours on why merge is useful and underappreciated but I will boil it down to one use case only: templates. Merge is crucial if you're assembling some textual template that is not LiveCode but want to generate parts of it in LiveCode. For example, the first step in

Re: The merge function is redundant?

2019-01-18 Thread hh via use-livecode
> Kee N. wrote: > I’m confused. Can someone explain why merge function exists when > the put function works just as well? > merge([[ 1 + 2 ]] = 3) vs put 1 + 2 && “= 3” merge([[ 1 + 2 ]] = 3) produces a script error, this should read merge("[[ 1 + 2 ]] = 3"). Merge is the one and only function

Re: The merge function is redundant?

2019-01-18 Thread Richard Gaskin via use-livecode
kee nethery wrote: > I’m confused. Can someone explain why merge function exists when the > put function works just as well? > > merge( [[ 1 + 2 ]] = 3) > vs > put 1 + 2 && “= 3” > > What is it that merge can do that a put cannot do? Just asking because > I don’t want LiveCode to end up like

Re: The merge function is redundant?

2019-01-18 Thread J. Landman Gay via use-livecode
On 1/18/19 12:33 PM, kee nethery via use-livecode wrote: I’m confused. Can someone explain why merge function exists when the put function works just as well? merge( [[ 1 + 2 ]] = 3) vs put 1 + 2 && “= 3” What is it that merge can do that a put cannot do? For me, it's convenience,

Re: The merge function is redundant?

2019-01-18 Thread prothero--- via use-livecode
Folks, I’ve been following this discussion, barely. I don’t use merge, but when I need to form a command from several variables, I create the command as a text string and use do to execute it. So, when I look it up in the dictionary, I see a fairly simplistic description with nothing

Re: The merge function is redundant?

2019-01-18 Thread Geoff Canyon via use-livecode
There's some overlap, but merge has (at least) one feature that put doesn't: the ability to run code within its statement. A simple example: put merge("The coin came up .") The equivalent might be: put "The coin came up" && item random(2) of "heads,tails" & "." But consider this:

The merge function is redundant?

2019-01-18 Thread kee nethery via use-livecode
I’m confused. Can someone explain why merge function exists when the put function works just as well? merge( [[ 1 + 2 ]] = 3) vs put 1 + 2 && “= 3” What is it that merge can do that a put cannot do? Just asking because I don’t want LiveCode to end up like Perl where there are so many