Versions Compared

Key

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

Resets The reset API can be used to reset the contents of a field \to it's value to its initial value.initial value.

Parameters
  • Field name (Standalone, array, ds)
Example
Code Block
languagejavascript
  pjs.define("DS1", { type: 'data structure', qualified: true, elements: {
    "Day1": { type: 'char', length: 6, initValue: 'MONDAY' },
    "Day2": { type: 'char', length: 8, initValue: 'TUESDAY' },
    "JDate": { type: 'char', length: 8, initValue: '010101' }
  }});

  DS1.Day1 = 'FRIDAY';

  pjs.reset(DS1);
 
  //DS1.Day1 = 'MONDAY'

RPG Equivalent: RESET