The format specification is generally the same as that for the C spritnf function. The two major differences are the addition of
control and the
Grouping is controlled through a ',' character followed by a positive integer. The integer specifies the length of each character group, beginning from the right of the result. For instance, a format of
will group an integer result in sets of
, such that
. A format of
will group a hexadecimal result in sets of
, such that the value
Note that grouping is ignored for types x and X if # is specified. Grouping is also ignored when type is
. When type is e or f, grouping is only performed on the numerator portion of the decimal.
Binary Type [b]
The binary type formats an value as its set of bits. The binary type does not support string or decimal values.