Versions Compared

Key

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

The number.toZeroFillString() function allows you to convert a number to a '0' left-padded string to the length provided to the function.

Parameters
  1. length

...

Example:

 

Code Block
pjs.define("num", { type: 'decimal', length: 7, decimals: 2, initValue: 12345.14 });
pjs.define("result", { type: 'char', length: 52, varying: true });

result = num.toZeroFillString(10);
 
return result;
//0012345.14