Return subset of elements from an array.
Parameters
- Starting index
- Element count
Return Value
Array of elements from parent array.
Example
pjs.define("a", { type: 'integer', dim: 5 }); pjs.define("resultArr", { type: 'integer', dim: 20 }); a[1] = 9; a[2] = 5; a[3] = 16; a[4] = 13; a[5] = 3; // Copy part of an array to another array: resultArr = a.subarray(4, 2);
RPG EquivalentÂ
%SUBARR