I'm looking for a way to get a nice, neat formatted output for something like a bank book.
The display would have the following headings at the top:
Tr# Date Time Details Amount Balance
Tr# would be a 3 digit transaction number
Date would be the date of the transaction in DD-MMM-YYYY format
Time would be the time of the transaction in HH:MM:SS AM/PM format
Details would be Deposit, Withdraw, Bal. Fwd., Interest, or any one of a number of other things
Amount would be the amount added to or taken from the account in normal currency format, with the $ left justified in the column and the amount right justified....maximum 13 characters
Balance would be the current balance up to and including that transaction. maximum 16 characters.
the information is stored in a hash table, and I'd like the hash table to update (ie: get rid of the old information) when the person calls for a bank book update.
Hope someone can help me with this, as it's driving me bonkers. I already have some coding that I think will help, but not sure. The coding follows
alias charpad {
return $iif($len($1) < $int($2), $+($str($left($$3,1),$calc($int($2) - $ifmatch)),$1), $1)
}
alias decim {
tokenize 46 $$2. $1
return $+($2.,$3,$str(0,$calc($1 -$len($3))))
}