put one array after another

Mike Bonner bonnmike at gmail.com
Wed Aug 10 13:58:40 EDT 2016


Try union
union firstarray with secondarray
though if you have duplicate keys, the duplicate will not change the
current.  From the dictionary...

local tLeft, tRight put "green" into tLeft["color"] put "left" into tLeft[
"align"] put "blue" into tRight["color"] put "100" into tRight["width"]
union tLeft with tRight # RESULT # tLeft["colour"] = "green" #
tLeft["align"] = "left" # tLeft["width"] = "100" # tRight unchanged

On Wed, Aug 10, 2016 at 11:17 AM, Colin Holgate <colinholgate at gmail.com>
wrote:

> In other languages there is a concat function to join two arrays. It’s in
> the glossary, but not there as a function.
>
>
> > On Aug 10, 2016, at 5:41 PM, Matt Maier <blueback09 at gmail.com> wrote:
> >
> > Is there a command to merge two array variables into one?
> >
> > Example:
> >
> > tFirstArray[tom] = mot
> > tFirstArray[jane] = enaj
> >
> > tSecondArray[bill] = llib
> > tSecondArray[name] = eman
> >
> > put tSecondArray after tFirstArray
> >
> > tFirstArray[tom] = mot
> > tFirstArray[jane] = enaj
> > tFirstArray[bill] = llib
> > tFirstArray[name] = eman
> > _______________________________________________
> > 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
>
>
> _______________________________________________
> 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