Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

string.scanToArray() provides the ability to look for a value in a string and puts the results into an array.

Parameters
  1. Array to put results into
  2. Value to look for
  3. Index to start from
  4. Length to search for
Example
  pjs.define("Arr1", { type: 'packed decimal', length: 1, decimals: 0, dim: 3 });
  pjs.define("FIELD1", { type: 'char', length: 7 });
  pjs.define("FIELD2", { type: 'char', length: 1 });

  pjs.move(FIELD1, 'YARYRYY');
  pjs.move(FIELD2, 'Y');
 
  FIELD1.scanToArray(Arr1, FIELD2, 3);
 
  result = Arr1[1] + Arr1[2] + Arr1[3];
  • No labels