Analog Devices VISUALDSP++ 3.5 Manual page 413

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

Error Conditions
The
macro does not return an error condition.
va_arg
Example
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
char *concat(char *s1,...)
{
int len = 0;
char *result;
char *s;
va_list ap;
va_start (ap,s1);
s = s1;
while (s){
len += strlen (s);
s = va_arg (ap,char *);
}
va_end (ap);
result = malloc (len +7);
if (!result)
return result;
*result = '';
va_start (ap,s1);
s = s1;
while (s){
strcat (result,s);
s = va_arg (ap,char *);
}
va_end (ap);
return result;
}
See Also
va_end,
va_start
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
C/C++ Run-Time Library
3-159

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents