LTOA(DOS) XENIX System V LTOA(DOS)
Name
ltoa - Converts long integers to characters.
Syntax
#include <stdlib.h>
char *ltoa (value, string, radix);
long value;
char *string;
int radix;
Description
The ltoa function converts the digits of the given value to
a null-terminated character string and stores the result in
string. The radix argument specifies the base of value. It
must be in the range 2-36. If radix equals 10 and value is
negative, the first character of the stored string is the
minus sign (-).
Return Value
ltoa returns a pointer to string. There is no error return.
See Also
itoa(DOS), ultoa(DOS)
Example
#include <stdlib.h>
int radix = 10; char buffer[20]; char *p;
p = ltoa (-344115L,buffer,radix); /* p = "-344115" */
Notes
The space allocated for string must be large enough to hold
the returned string. The function can return up to 33
bytes.
This call must be compiled with the -dos flag.
Page 1 (printed 8/7/87)