User`s guide
KwikNet Low Level Services
K
A
DAK
153
Formats ...continued
Allowable format specification strings must be of the form
"...%-0##z?..."
where:
% = format specification leadin character; use %% for % in output string
- = left justify in field
0 = zero fill
## = field width as decimal value
z = l if variable is long (? is one of d, u, x, X)
z = h if variable is short int (? is one of d, u, x, X)
z = h for an IP address in hex format (? is one of a, A)
? = one of following field variable specifications
c = character value
d = decimal integer value
u = unsigned decimal integer value
x = unsigned hexadecimal integer value (use a..f)
X = unsigned hexadecimal integer value (use A..F)
f = fill with next character to field width
p = pointer value
s = string value
a = internet IPv4 address as "1.26.3.127"
"%03a"
yields "001.026.003.127"
ha
= internet IPv4 address as "01.1a.03.ff"
"%hA"
yields "01.1A.03.FF"
"%0##a"
yields "001.002.003.004"
for any non-zero value "0##".
"%0##ha" yields "0a.0b.0c.0d"
for any non-zero value "0##".
S = copy characters from format string into the output field
until '`' is encountered
"%20Sabc`" right justifies "abc" in a 20 character field.
"%-20Sabc`" left justifies "abc" in a 20 character field.
Numeric fields that overflow the field width are formatted as
xxxxx to the
full width of the field.