declaring several arrays (LUTs)

Im highly confused with this... and feel like its a silly question, tbh.
Isnt there a way of declaring several arrays of same length in just one line ?
In the style of

uint16_t ii, iii, iiii, iv;

As you can probably guess, they are-to-be LUTs

What im trying to short down is something like this :

uint16_t sin_data[WAVE_SAMPLES];
uint16_t cos_data[WAVE_SAMPLES];
uint16_t saw_data[WAVE_SAMPLES];
uint16_t tri_data[WAVE_SAMPLES];
uint16_t sq_data [WAVE_SAMPLES];

where WAVE_SAMPLES is already defined in

#define WAVE_SAMPLES 512.

Thanks in advance

Before you go any further could you please say which Arduino you have as your proposed arrays are chewing up an awful lot of memory.

Isnt there a way of declaring several arrays of same length in just one line ?

There is, but why would it matter?

Arduino Due ( Code its working, nuh worries there).
Im getting engulfed in more and more lines of code .
Answer, anyone ?

uint16_t sin_data[WAVE_SAMPLES],
 cos_data[WAVE_SAMPLES],
 saw_data[WAVE_SAMPLES],
 tri_data[WAVE_SAMPLES],
 sq_data [WAVE_SAMPLES];

(It's conceptual - imagine one stupidly long single line)

Defeats the initial purpose :slight_smile:
It was something that has baffled me. My intention is just to write better code, while readable.
Of course code obfuscating is an art in itself 8)

Make a typedef then.
I can't really see the problem.

No problem.
I meant initial purpose of a "one line solution".
Your way is a new way for me and ill use it
Thanks !

If your arrays are the same length, as AWOL pointed out, a typedef would be useful.

typedef uint16_t arr_t[ WAVE_SAMPLES ];

arr_t ii, iii, iiii, iv;

Thanks .