Definition: | string res = ppf(object o, sequence options={}) |
Description: |
Return object pretty printed (with embedded \n), no trailing \n. For options, see ppOpt. |
Comments: |
The previous pretty_print options are restored on exit.
ppExf is a pre-optional-parameters version of this routine. |
Example: |
ppOpt({pp_IntFmt,"%d.00 US$"}) ppOpt({pp_FltFmt,"%.2f US$"}) x=ppf(1) -- x is "1.00 US$" Note the deliberate setting of both pp_IntFmt and pp_FltFmt to yield consistent results. The following one line could be used instead of the above, apart from the options not being permanent: x=ppf(1,{pp_IntFmt,"%d.00 US$",pp_FltFmt,"%.2f US$"}) |
See Also: | pp, ppOpt |