Task

Show how to concatenate two arrays in your language.



If this is as simple as array1 + array2, so be it.




arraybase 1
global c
 
dimen = 5
dim a(dimen)
dim b(dimen)
# Array initialization
for i = 1 to dimen
	a[i] = i
	b[i] = i + dimen
next i
 
nt = ConcatArrays(a, b)
 
for i = 1 to nt
	print c[i];
	if i < nt then print ", ";
next i
end
 
function ConcatArrays(a, b)
	ta = a[?]
	tb = b[?]
 
	nt = ta + tb
	redim c(nt)
 
	for i = 1 to ta
		c[i] = a[i]
	next i
	for i = 1 to tb
		c[i + ta] = b[i]
	next i
 
	return nt
end function