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.

NotesPortabilityIf ptr does not match a pointer earlier returned by calloc, malloc, or realloc, or if thespace has been deallocated by a call to free or realloc, the behaviour is undefined.free con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).itoaSynopsisDescription#include char *itoa(int val, char *buf, int radix);itoa converts val to a string in base radix and places the result in buf.itoa 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 itoa is an extension to the standard C library provided by <strong>CrossWorks</strong> C.See Also ltoa (page 301), lltoa (page 300), ultoa (page 309), ultoa (page 309), utoa (page 310)ldivSynopsisDescription#include ldiv_t ldiv(long int numer, long int denom);ldiv computes numer / denom and numer % denom in a single operation.ldiv returns a structure of type ldiv_t (page 299) comprising both the quotient and theremainder. The structures contain the members quot (the quotient) and rem (theremainder), each of which has the same type as the arguments numer and denom. Ifeither part of the result cannot be represented, the behavior is undefined.Portabilityldiv con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See also ldiv_t (page 299)ldiv_tSynopsis#include typedef struct{long int quot;long int rem;} ldiv_t;Chapter 28 - General utilities299

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

Saved successfully!

Ooh no, something went wrong!