Question
· 20 hr ago

Single Operation to Concatenate 2 %DynamicArrays?

Hello,

Is there a single ObjectScript operator or method to concatenate two %DynamicArrays?

I'm looking for something that will do the following:

set arr1 = [ 1, 2, 3 ]
set arr2 = [ 4, 5, 6 ]
set arrcombined = arr1.%Concatenate(arr2)

or 

set arrcombined arr1_arr2

With end result:

zw arrcombined
arr1=[1,2,3,4,5,6]  ; <DYNAMIC ARRAY>

I can iterate and %Pop over the 2nd array and %Push each popped entry to the 1st array, but I was looking for something more succinct.

Thanks in advance.

Product version: IRIS 2024.1
$ZV: IRIS for Windows (x86-64) 2024.1.1 (Build 347U) Thu Jul 18 2024 17:35:51 EDT
Discussion (3)1
Log in or sign up to continue