Example Frames
158
PT Program Generator (PPG) v5.0
Figure 129. Tip14.scr Pads a Number with Leading Zeros
This technique can be used with any fixed length by simply changing the fixed
length of the second template and providing enough zeros in the
Copy
node.
Copy: QTY
Copies the quantity value in the default register into the INPUT SIZE
register.
Modify:
REVERSE1
Reverses the order of digits in the INPUT SIZE register.
Copy: ZEROS
Copies six zeros to the end of the value in the INPUT SIZE register.
Copy: 1ST SIX
Copies the first six digits in the INPUT SIZE register back into the
Quantity field of the default register. Any zeros beyond the sixth digit are
dropped.
Modify:
REVERSE2
Reverses the six characters in the default register, returning the original
input to the correct order with leading zeros.
2342.book Page 158 Thursday, July 22, 2004 8:35 AM