Search code examples
smalltalksqueakvisualworks

How to, in smalltalk,append two arrays


Had to change this up. I have two arrays and I want to essentially concatenate them into one array.

 completearray:= completearray, temparray."concatenate the new array to the existing one"

How do I get this working please? Thanks.


Solution

  • Your code works in Squeak, so what is the problem?

    anArray := #(1 2 3 4).
    anotherArray := #(5 6 7).
    anArray, anotherArray "Returns #(1 2 3 4 5 6 7)"