index

Varkon MBS Programmers manual


outint - Procedure

Description

Converts an integer to a string with optional formatting and writes the result to an open file or pipe.

Syntax

  outint(f, i, width);

  file f;
  int  i;
  int  width;

Principal parameters

f - The name of a filevariable associated with a file open for write, append or update (W, A or U)
i - The integer to write

Optional parameters

width - Controls the amount of padding. If width is less than the actual space required no padding
   is performed. If width is larger than the space required the result is padded with blanks.
   The sign of width controls weather padding is done on the left side of the result (+) or the
   right side (-). If not specified, width is set to zero = no padding.

Examples

  outint(f, 12345) => "12345"

  outint(f, 12345, 10) => "     12345"

  outint(f, 12345, -10) => "12345     "

See also

outflt() and str()


SourceForge.net Logo

Varkon 1.19D svn # 120M