
Example Frames
Figure 129. Tip14.scr Pads a Number with Leading Zeros
Copy: QTY | Copies the quantity value in the default register into the INPUT SIZE |
| register. |
Modify: | Reverses the order of digits in the INPUT SIZE register. |
REVERSE1 |
|
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: | Reverses the six characters in the default register, returning the original |
REVERSE2 | input to the correct order 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.
158 | PT Program Generator (PPG) v5.0 |