array.subarray()
Returns a subset of elements from an array.
Parameters
Starting index
Element count
Return Value
Array of elements that were retrieved from the 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
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!