P99

◆ P99_AASSIGN

#define P99_AASSIGN (   TARGET,
  SOURCE,
 
)

Assign the content of array SOURCE to TARGET.

Only the N first elements are copied. Use it as in

size_t B[4] = { 2, 3, 4, 5 };
double *A = malloc(sizeof(double[4]));
P99_AASSIGN(A, B, 4);
Precondition
N must expand to a decimal integer constant.
SOURCE and TARGET must be arrays with a size of at least N or pointers that point to such arrays.
Remarks
If TARGET has more than N elements the excess elements are left untouched.
The base types must not necessarily be the same but that of SOURCE must be assignable to that for TARGET. In particular, the type of TARGET should be at least as wide as that for SOURCE.

Definition at line 355 of file p99_map.h.

P99_AASSIGN
#define P99_AASSIGN(TARGET, SOURCE, N)
Assign the content of array SOURCE to TARGET.
Definition: p99_map.h:355