Next Previous Contents

## 3.92 ltoa

> Function

>   Convert a long integer into a string.

> Header

>   `stdlib.h`

> Declaration

>   `char* __fastcall__ ltoa (long val, char* buf, int radix);`

> Description

>   `itoa` converts the long integer `val` into a string using `radix` as the base.

> Limits

>   - There are no provisions to prevent a buffer overflow.
>   - If `val` contains `LONG_MIN`, the behaviour is undefined.
>   - The function is non standard, so it is not available in strict ANSI mode. You should probably use `sprintf` instead.
>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
> Availability

>   cc65

> See also

>   atoi, atol, itoa, ultoa, utoa

> Example

>   None.

Next Previous Contents