The merge function is awesome!

Geoff Canyon gcanyon at gmail.com
Thu Jan 17 12:02:40 EST 2019


On Thu, Jan 17, 2019 at 4:36 AM hh via use-livecode <
use-livecode at lists.runrev.com> wrote:

> > Geoff wrote:
> > using value():
> > the name of tID && "[" & the id of tID & "]"
> > using merge():
> > [[the name of tID]] - ([[the id of tID]])
> > (is there a way to escape the "["?)
>
> You could use with merge not only variables but also functions
> that are available for the script that calls merge:
>
> [[br(the id of tID)]]
>
> function br x
>   return "[" & x & "]"
> end br
>

True, and you've just given me an idea how to handle things like
font/styling tags. Something like:

function ifTag b,o,s,c
    if b then return o & s & c else return s
end ifTag



More information about the Use-livecode mailing list