Hi,

Format() is supposed to support a few more formatting characters than we
do ATM. Thanks go out to Brian Provinciano for pointing these out:

In the following strings, 'n' is a decimal number; all other characters
enclosed in double quotes are literal:


Format("%nd", x) = (pad length(x_str)) ++ x_str
                where
                        x_str = show(x)
                        pad x = if (x <= 0) then ""
                                        else (' ' : (pad (x-1)))


Format("%-nd", x) = x_str ++ (pad length(x_str))
                where
                        x_str = show(x)
                        pad x = if (x <= 0) then ""
                                        else (' ' : (pad (x-1)))


Format("%0nd", x) = (zpad length(x_str)) ++ x_str
                where
                        x_str = show(x)
                        zpad x = if (x <= 0) then ""
                                        else ('0' : (zpad (x-1)))


Format("%*d", x, y) is not supported.
Format("%X", x, y) returns a 32 bit value whose lower 16 bits originate
from x (y is ignored). The source for the upper 16 bits remains a mystery
at this point...


llap,
 Christoph


Reply via email to