reshapearrayArray Opcodesreshapearrayreshapearray
Reshape an array, maintaining its capacity
DescriptionPlugin 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.
Syntaxreshapearray array[], isize0 [, isize1 ]Initializationarray[] - 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 0Examples
Here is an example of the reshapearray opcode. It uses the file reshapearray.csd.
Example of the reshapearray opcode.See alsoArray opcodesCreditsBy: &nameeduardo; 2018New plugin in version 6.12