|
In the following code, I want to put 2 currency
amounts into a text line, right justified and zero filled. The fields are
11 spaces each.
The first amount should go into 1 thru 11 and the
second amount should go into 12 thru 22.
However, it seems that the format function is
putting a sign field in front of the digits and therefore truncating the last
digit.
Anyone know how I can eliminate the extra space in
front of the amounts?
set echo on set var gross curr = 35,123.45 set var ftax curr = 2,345.56 set var igrs int = (.gross * 1000/10) set var itax int = (.ftax * 1000/10) set var agrs = (format(.igrs,"[>]00000000000")) set var atax = (format(.itax,"[>]00000000000")) set var ln = " " set var ln = (sput(.ln,.agrs,1)) set var ln = (sput(.ln,.atax,12)) set var ln2 = " " set var ln2 = (smove(.agrs,1,11,.ln2,1)) set var ln2 = (smove(.atax,1,11,.ln2,12)) write .ln write .ln2 set var ln3 = " " set var ln3 = (smove("ABCDE",1,5,.ln3,1)) set var ln3 = (smove("fghij",1,5,.ln3,6)) write .ln3 set echo off return |
- picture format problem 6.5++ dos Bernard Lis
- picture format problem 6.5++ dos J.M. GRATIAS
- Re: picture format problem 6.5++ dos James (Jim) Bentley
- Re: picture format problem 6.5++ dos Duey Heffelfinger
- Re: picture format problem 6.5++ dos SOLV... Bernard Lis
- Re: picture format problem 6.5++ dos J.M. GRATIAS
