Aggregate Constructor Expression Support - Analog Devices VISUALDSP++ 3.5 Manual

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

Advertisement

The following example shows how to label the array initializer elements
when the indices are characters or an enum type.
/* Example 3 Array Initializer With enum Type Indices */
/* cc219x C/C++ array initializer */
int whitespace[256] =
{
[' '] 1, ['\t'] 1, ['\v'] 1, ['\f'] 1, ['\n'] 1, ['\r'] 1
};
In a structure initializer, specify the name of a field to initialize with field
name before the element value. The standard C/C++ and
struct initializers in the example below are equivalent.
/* Example 4 Standard & cc219x C/C++ struct Initializer */
/* Standard struct Initializer */
struct point {int x, y;};
struct point p = {xvalue, yvalue};
/* Equivalent cc219x C/C++ struct Initializer With
Labeled Elements */
struct point {int x, y;};
struct point p = {y: yvalue, x: xvalue};

Aggregate Constructor Expression Support

Extended initializer support in
gate constructor expressions. These expressions enable you to assign values
to large structure types without requiring each element's value to be indi-
vidually assigned.
The following example shows an ISO/ANSI standard
lowed by equivalent
constructor expression.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
cc219x
code that has been simplified using an
cc219x
C/C++ includes support for aggre-
struct
Compiler
C/C++
cc219x
usage fol-
1-89

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