PUTOCT - output an octal number.

Usage:

B:
   putoct( number [, length, fill] );
C:
   void putoct(int number [, int length, int fill] );

Where:

number
is the number to be written out.
length
is the minimum width of the output field including the sign. If "length" is not specified, the default is zero (no minimum).
fill
is an ASCII character to be used as a fill character when padding the output to the desired "length". The default "fill" character is a zero.

Description:

PUTOCT outputs the given "number" in octal format on the current write unit.

Examples:

putoct(10)           will output 12
putoct(-10,5)        will output 777777777766
putoct(10,10,'b')    will output bbbbbbbb12
putoct(-10,10,'b')   will output 777777777766

Generally speaking, it is preferable to use PRINTF instead of PUTOCT.

See Also:

expl b lib printf

Copyright © 1996, Thinkage Ltd.