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.

Pseudo-random sequence generation functionsRAND_MAXrandsrandMaximum value returned by randReturn next random number in sequenceSet seed of random number sequenceMemory allocation functionscallocfreemallocreallocAllocate space <strong>for</strong> an array of objects and initialize them to zeroFrees allocated memory <strong>for</strong> reuseAllocate space <strong>for</strong> a single objectResizes allocated memory space or allocates memory spaceatofSynopsisDescriptionPortability#include int atof(const char *nptr);atof converts the initial portion of the string pointed to by nptr to an int representation.atof does not affect the value of errno on an error. If the value of the result cannot berepresented, the behavior is undefined.Except <strong>for</strong> the behavior on error, atof is equivalent to strtod(nptr, (char**)NULL).atoi returns the converted value.atoi con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See Also strtol (page 303)atoiSynopsisDescription#include int atoi(const char *nptr);atoi converts the initial portion of the string pointed to by nptr to an int representation.atoi does not affect the value of errno on an error. If the value of the result cannot berepresented, the behavior is undefined.Except <strong>for</strong> the behavior on error, atoi is equivalent to (int)strtol(nptr, (char**)NULL, 10).atoi returns the converted value.296 Chapter 28 Standard C Library Reference

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

Saved successfully!

Ooh no, something went wrong!