Sujet : Re: do { quit; } else { }
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 09. Apr 2025, 11:36:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vt5ij2$e5qu$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Mozilla Thunderbird
On 09/04/2025 10:00, Ike Naar wrote:
On 2025-04-08, bart <bc@freeuk.com> wrote:
However if I need to initialise the variable:
>
extern int table[]; // shared
int table[] = (10, 20, 30)
>
then other modules can't pick up length of the array.
extern int table[3];
That is not practical to do. If it was, you'd just write:
int table[3] = (10, 20, 30)
instead. But now you need to track the size of the data (it could be 1000s of elements) and keep both bounds updated.
The data can also include conditional elements that affect the total.