11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

If val is negative and radix is 10, the string has a leading minus sign (-); <strong>for</strong> all othervalues of radix, value is considered unsigned and never has a leading minus sign.Portability lltoa is an extension to the standard C library provided by <strong>CrossWorks</strong> C.See Also itoa (page 299) ltoa (page 301) ultoa (page 309) ultoa (page 309) utoa (page 310)ltoaSynopsisDescription#include char *ltoa(long val, char *buf, int radix);ltoa converts val to a string in base radix and places the result in buf.ltoa returns buf as the result.If radix is greater than 36, the result is undefined.If val is negative and radix is 10, the string has a leading minus sign (-); <strong>for</strong> all othervalues of radix, value is considered unsigned and never has a leading minus sign.Portability ltoa is an extension to the standard C library provided by <strong>CrossWorks</strong> C.See Also itoa (page 299) lltoa (page 300) ultoa (page 309) ultoa (page 309) utoa (page 310)mallocSynopsisDescriptionPortability#include void *malloc(size_t size);malloc allocates space <strong>for</strong> an object whose size is specified by size and whose value isindeterminate.malloc returns a null pointer if the space <strong>for</strong> the object cannot be allocated from freememory; if space <strong>for</strong> the object can be allocated, malloc returns a pointer to the start ofthe allocated space.malloc con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).randSynopsisDescriptionPortability#include int rand(void);rand computes a sequence of pseudo-random integers in the range 0 to RAND_MAX.rand returns the computed pseudo-random integer.rand con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).Chapter 28 - General utilities301

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!