17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

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

Built-in Functions<br />

void main(void) {<br />

char c;<br />

Example Files:<br />

if(!tx_buffer_full())<br />

putc(c);<br />

}<br />

None<br />

Also See: _USE_RS232( ), RCV_BUFFER_FULL( ), TX_BUFFER_FULL( ).,<br />

RCV_BUFFER_BYTES( ), GETC( ), PUTC( ), PRINTF( ), SETUP_UART(<br />

)., PUTC_SEND( )<br />

va_arg( )<br />

Syntax:<br />

Parameters:<br />

va_arg(argptr, type)<br />

argptr is a special argument pointer of type va_list<br />

type – This is data type like int or char.<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

The first call to va_arg after va_start return the value of the parameters<br />

after that specified by the last parameter. Successive invocations return<br />

the values of the remaining arguments in succession.<br />

The function will return the next argument every time it is called.<br />

All devices.<br />

#INCLUDE <br />

Examples:<br />

int foo(int num, ...)<br />

{<br />

int sum = 0;<br />

int i;<br />

va_list argptr; // create special argument pointer<br />

va_start(argptr,num); // initialize argptr<br />

for(i=0; i

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

Saved successfully!

Ooh no, something went wrong!