reshapearray
Reshape an array, maintaining its capacity
Plugin opcode in emugens.
The reshapearray opcode changes the shape of an array, as long as this does not modify its capacity. It can be used to convert a 1D to a 2D array, or viceversa, or simply to modify the size of its dimensions, as long as the product remains constant.
Syntax
Initialization
array[] - The array to be reshaped (this is done inplace)
isize0 - The size of the first dimension
isize1 - The size of the second dimension (0 for 1D arrays). Defaults to 0
Examples
Here is an example of the reshapearray opcode. It uses the file reshapearray.csd.
See also
Credits
By: Eduardo Moguillansky 2018
New plugin in version 6.12