fmt, strfmt - formatted output

SYNOPSIS

<fmt format [arg ...]>
or
<strfmt format [arg ...]>


DESCRIPTION
The fmt function allows flexible control over how variables are printed. It behaves much like the standard C function printf(), with additional formats for URL escapement, query markup, date/time printing, etc. The function strfmt is the string version - its output becomes the value of $ret instead of being printed out.

The format argument controls the output. Each format code in it - a % followed by one or more letters - indicates how to print the next remaining argument. Any escape sequences - a backslash (\) followed by a letter - indicate non-text characters to print. Any other letters in the format string are printed as-is.


DIAGNOSTICS
fmt returns nothing. strfmt returns the formatted output as a string in $ret.


CAVEATS
The fmt function was added Sep. 20 1996. strfmt was added Jan. 30 1997.

Only the first value of multi-value arguments is currently used. Giving too many or too few arguments for the format will result in an error message to that effect.



Copyright © Thunderstone Software     Last updated: Oct 24 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.