How to append a List with another List?

Post your questions and help other users.

Moderator: Martin

Post Reply
natong
Posts: 80
Joined: 29 Aug 2015 05:24

How to append a List with another List?

Post by natong » 09 Sep 2015 02:04

Code: Select all

list1 = newList(1, 2, 3);
list2 = newList(11, 22, 33);
list3 = newList();

for (x in list1)
{
       addElement(list3, x);
}

for (x in list2)
{
       addElement(list3, x);
}
Is there an easy way to append a List with another List (combine List) ?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: How to append a List with another List?

Post by Martin » 09 Sep 2015 19:16

Hi,

Function addAllElements(list3, list1); should work.

Regards,
Martin

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: How to append a List with another List?

Post by MURTUMA » 10 Sep 2015 03:30

I'm only getting complaint about unknown function name.

natong
Posts: 80
Joined: 29 Aug 2015 05:24

Re: How to append a List with another List?

Post by natong » 10 Sep 2015 03:54

MURTUMA wrote:I'm only getting complaint about unknown function name.
1.29.0-dev (2015-08-28)
[*] new script functions addAllElements, removeDuplicateElements and addAllMapEntries added



I am so excite waiting the final version.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: How to append a List with another List?

Post by MURTUMA » 10 Sep 2015 09:31

So it works on the eap build, but not yet on the official release? Thanks for clarification.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: How to append a List with another List?

Post by Martin » 11 Sep 2015 17:51

Sorry, missed that this function was added in the EAP of 1.29 so you still have to loop on 1.28.

Post Reply