Versions Compared

Key

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

Convert to decimal and half adjust.

...

Code Block
languagejavascript
pjs.define("p1", { type: 'packed decimal', length: 15, decimals: 5 });
pjs.define("c15bc1", { type: 'char', length: 15, initValue: ' + 9 , 8 7 6 ' });

p1 = pjs.dech(c15bc1, 5, 2);
return p1; 
//9.88000

 


RPG Equivalent

%DECH()