Counter.pm
NAME
Communiware::DE::Counter - Dynamic element Counter
SYNOPSIS
<:Counter ATTRIBUTE "word(sufix1|suffix2|suffix5)" [K|M|KM] X NONZERO=value:>
DESCRIPTION
Shows value of numeric attribute, accompanied with word in correct gramatic form.
Argument word is base part of word which is not changed despite of counter value, suffix1 is suffix for value one, suffix2 for two and suffix5 for five (this covers all possible word forms in Russian language). Parentethes and vertical bars are part of syntax and should be typed in.
If second argument is K or M, value would be divided to 1024 or 1048576 respectively and printed as floating point number with this suffix appended. If second argument is KM, M will be used if value > 9999999, K will be used for 9999999 >= value > 9999 and no second agrument will used for value <= 9999.
Third argument is number which would be added to value of counter before displayed.
If NONZERO parameter specified, then we print nothing if ATTRIBUTE has zero value.
If ``word'' contains gramma forms for some parts all of them will be proceeded.
If ``word'' contains valid sprintf numeric format like %d or %.4f (%g et al are not supported), resulting value would be formatted according to this format.