11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

char ch = (char)va_arg(ap, int);Portabilityva_arg con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See also va_copy (page 279), va_end (page 279), va_end (page 279)va_copySynopsisDescriptionPortability#include void va_copy(va_list dest, va_list src);va_copy initializes dest as a copy of src, as if the va_start macro had been applied todest followed by the same sequence of uses of the va_arg macro as had previously beenused to reach the present state of src. Neither the va_copy nor va_start macro shall beinvoked to reinitialize dest without an intervening invocation of the va_end macro <strong>for</strong>the same dest.va_copy con<strong>for</strong>ms to ISO/IEC 9899:1999 (C99).See also va_arg (page 278), va_end (page 279), va_end (page 279)va_endSynopsisDescriptionPortability#include void va_end(va_list ap);va_end indicates a normal return from the function whose variable argument list apwas initialised by va_start or va_copy. The va_end macro may modify ap so that it isno longer usable without being reinitialized by va_start or va_copy. If there is nocorresponding invocation of va_start or va_copy, or if va_end is not invoked be<strong>for</strong>e thereturn, the behavior is undefined.va_end con<strong>for</strong>ms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).See also va_arg (page 278), va_copy (page 279), va_end (page 279)va_endSynopsisDescription#include void va_start(va_list ap, parmN);va_start initializes ap <strong>for</strong> subsequent use by the va_arg and va_end macros.The parameter parmN is the identifier of the last fixed parameter in the variableparameter list in the function definition (the one just be<strong>for</strong>e the ', ...').Chapter 28 - Variable arguments279

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

Saved successfully!

Ooh no, something went wrong!