Task

Show how to concatenate two arrays in your language.



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




FUNCTION ConcatArrays(a(), b())
	ta = UBOUND(a)
	tb = UBOUND(b)
 
	nt = ta + tb
 
	FOR i = ta + 1 TO nt
		a(i) = b(i - ta)
	NEXT i
 
	ConcatArrays = nt
END FUNCTION
 
dimen = 5
DIM a(dimen)
DIM b(dimen)
 
FOR i = 1 TO dimen
	a(i) = i
	b(i) = i + dimen
NEXT i
 
nt = ConcatArrays(a(), b())
 
FOR i = 1 TO nt
	PRINT a(i);
	IF i < nt THEN PRINT ", ";
NEXT i
 