RosettaCodeData/Task/Array-concatenation/BASIC/array-concatenation-1.basic

18 lines
333 B
Plaintext

' Array concatenation
OPTION BASE 1
CONST asize = 2
CONST bsize = 3
DECLARE a[asize] TYPE NUMBER
DECLARE b[bsize] TYPE NUMBER
' BaCon has no array concatenation builtin, it will need to be done by hand
LOCAL c TYPE NUMBER ARRAY asize + bsize
FOR i = 1 TO asize
c[i] = a[i]
NEXT
FOR i = 1 TO bsize
c[asize + i] = b[i]
NEXT