This is an old revision of the document!
Decimal formatting variants: Dec and Dec1 through Dec11.
from cubloc import DecN # Natural width Dec(value: int) # Fixed width Dec1(value: int) ... Dec11(value: int)
value to format.DecN variants. Use 0 for natural width (Dec).Returns the formatted decimal string using either natural width (Dec) or fixed-width right-justified text (Dec1 through Dec11).
Dec(value) returns natural-width decimal text.Dec1..Dec11 return right-justified decimal text in fixed-width fields.from cubloc import Dec, Dec4, Dec8 # Use Dec for natural width, or DecN variants for fixed width. value = 42 print(Dec(value)) # e.g. 42 print(Dec4(value)) # e.g. ' 42' print(Dec8(value)) # e.g. ' 42'