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 the subject sequence begins with a minus sign, the value resulting from theconversion is negated.A pointer to the final string is stored in the object pointed to by endptr, provided thatendptr is not a null pointer.If the subject sequence is empty or does not have the expected <strong>for</strong>m, no conversion isper<strong>for</strong>med, the value of nptr is stored in the object pointed to by endptr, provided thatendptr is not a null pointer.strtoul returns the converted value, if any. If no conversion could be per<strong>for</strong>med, zerois returned. If the correct value is outside the range of representable values,LONG_MAX (page 250) or ULONG_MAX (page 252) is returned according to the signof the value, if any, and the value of the macro ERANGE is stored in errno (page 247).Portabilitystrtoul con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).strtoullSynopsisDescription#include unsigned long long int strtoull(const char *nptr,char **endptr,int base);strtoull converts the initial portion of the string pointed to by nptr to a long intrepresentation.First, strtoull decomposes the input string into three parts: an initial, possibly empty,sequence of white-space characters (as specified by isspace (page 246)), a subjectsequence resembling an integer represented in some radix determined by the value ofbase, and a final string of one or more unrecognized characters, including theterminating null character of the input string. strtoull then attempts to convert thesubject sequence to an integer, and return the result.When converting, no integer suffix (such as U, L, UL, LL, ULL) is allowed.If the value of base is zero, the expected <strong>for</strong>m of the subject sequence is an optional plusor minus sign followed by an integer constant.If the value of base is between 2 and 36 (inclusive), the expected <strong>for</strong>m of the subjectsequence is an optional plus or minus sign followed by a sequence of letters and digitsrepresenting an integer with the radix specified by base. The letters from a (or A)through z (or Z) represent the values 10 through 35; only letters and digits whoseascribed values are less than that of base are permitted.If the value of base is 16, the characters '0x' or '0X' may optionally precede thesequence of letters and digits, following the optional sign.308 Chapter 28 Standard C Library Reference

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

Saved successfully!

Ooh no, something went wrong!