Method 1 - Make-Array
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-ref/xlisp-ref-162.htm
The “conventional” method to make an array is to first make an empty array of the required size using “make-array”,
then to add the elements of the array using (setf (aref n)) , where is the name of the array and “n” is the number of the array element (starting from 0).
An example to make a simple array with 3 elements (in this case two numbers and a string)
(setf test (make-array 3))
(setf (aref test 0) 3)
(setf (aref test 1) 5)
(setf (aref test 2) "a")
Method 2 - Vector
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-ref/xlisp-ref-296.htm
This is a short-cut for making one dimensional arrays.
It is used for creating arrays with initial data in the array.
Here’s an example with 3 elements - again two numbers and a string:
(setf test (vector 8 9 "b"))
Method 2 - ‘#’ [the hash symbol]
The hash symbol is a built in read macro for arrays that allows initialised arrays to be created in much the same way as using the “vector” function.
Here’s an example with 3 elements - again two numbers and a string:
(setf test #(6 7 "c"))
These functions can be tested in the Nyquist Prompt effect with the code:
(if (arrayp test)(print test))
You will need to use the Debug button in the Nyquist Prompt to see the output.