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 5 Next »

Convert to decimal and half adjust.

Parameters
  1. Value / field
  2. Total length (optional)
  3. Decimal places - does not add to the total length (optional)
Example
Example 1: char -> packed decimal
pjs.define("p1", { type: 'packed decimal', length: 15, decimals: 5 });
pjs.define("c1", { type: 'char', length: 15, initValue: ' + 9 , 8 7 6 ' });

p1 = pjs.dech(c1, 5, 2);

return p1; 
//9.88000

 


RPG Equivalent

%DECH()

  • No labels