[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EARRAYSIZE
From: |
Daniel Colascione |
Subject: |
Re: EARRAYSIZE |
Date: |
Thu, 03 Apr 2014 12:34:49 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 04/03/2014 12:30 PM, Eli Zaretskii wrote:
> +/* Find number of elements in array */
> +#define EARRAYSIZE(arr) (sizeof (arr) / sizeof ((arr)[0]))
>
> I find the name of this macro to be unfortunate: what it returns is
> not "size" in the accepted meaning of that word.
"Length", "size", and "count" are hopelessly confounded anyway. I'm not
attached to any particular term: I chose EARRAYSIZE because ARRAYSIZE
and ARRAY_SIZE hace been common in other projects I've worked on.
> How about ALEN, or ARRAYELTS instead?
Of these, I prefer ARRAYELTS. I'll change the name.
signature.asc
Description: OpenPGP digital signature
- EARRAYSIZE, Eli Zaretskii, 2014/04/03
- Re: EARRAYSIZE,
Daniel Colascione <=