Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Returns the number of elements in the specified array, table, or multiple-occurrence data structure.RPG Equivalent:

Parameters
  1. Array, table, or multiple-occurrence data structure.
Example
Code Block
languagejavascript
pjs.define("myConstant", { type: 'decimal', length: 1, decimals: 0, initValue: 4 });
pjs.define("myArray", { 
  type: 'packed decimal',
  length: 10,
  decimals: 0,
  dim: myConstant 
});
 
for (i = 1; i <= pjs.elem(myArray); i++) {
  console.log(MyArray[i]);
}

RPG Equivalent

%ELEM()