home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tclX-6.4 / help / strings / format < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.3 KB  |  21 lines

  1.           format formatString ?arg arg ...?
  2.                This command generates a formatted string in  the  same
  3.                way  as the C sprintf procedure (it uses sprintf in its
  4.                implementation).  FormatString indicates how to  format
  5.                the  result,  using  %  fields  as  in sprintf, and the
  6.                additional arguments, if  any,  provide  values  to  be
  7.                substituted  into  the  result.   All  of  the  sprintf
  8.                options  are  valid;  see  the  sprintf  man  page  for
  9.                details.   Each  arg  must match the expected type from
  10.                the  %  field  in  formatString;  the  format   command
  11.                converts  each  argument to the correct type (floating,
  12.                integer,  etc.)  before  passing  it  to  sprintf   for
  13.                formatting.   The only unusual conversion is for %c; in
  14.                this case the argument must be a decimal string,  which
  15.                will  then  be  converted  to  the  corresponding ASCII
  16.                character value.  Format does backslash substitution on
  17.                its  formatString  argument,  so backslash sequences in
  18.                formatString will be  handled  correctly  even  if  the
  19.                argument is in braces.  The return value from format is
  20.                the formatted string.
  21.