如何在smalltalk中附加两个数组

Kob*_*kie 1 smalltalk visualworks squeak

不得不改变这一点.我有两个数组,我想基本上将它们连接成一个数组.

 completearray:= completearray, temparray."concatenate the new array to the existing one"
Run Code Online (Sandbox Code Playgroud)

我该怎么办?谢谢.

Sea*_*ris 7

你的代码在Squeak中运行,那么问题是什么?

anArray := #(1 2 3 4).
anotherArray := #(5 6 7).
anArray, anotherArray "Returns #(1 2 3 4 5 6 7)"
Run Code Online (Sandbox Code Playgroud)

  • 这在VisualWorks或任何其他Smalltalk中都可以正常工作. (2认同)