Liste des Groupes | Revenir à c arch |
On Sun, 8 Sep 2024 6:25:10 +0000, David Brown wrote:Okay, I suppose - though I would rather have it being an appropriate type and, if necessary, change the type of "i". But I still don't get your point - what has this "SIZE" of 0x20000001 got to do with a "START" that you want to equal 0x80000001 ? Were you just trying to show that it is possible to make the number 0x80000001 in code, and got the numbers wrong? If you know that you might have numbers exceeding 32-bit ranges, then you need to use a 64-bit type as the index variable - and it can still happily be signed rather than writing more complicated code just to force it into an obsessive rule about using unsigned types.
On 08/09/2024 02:17, MitchAlsup1 wrote:I wanted SIZE to have the same type as i.On Sat, 7 Sep 2024 7:15:11 +0000, David Brown wrote:>
>
static uint64_t array[1024*1024*512+1]
static int SIZE = sizeof(array)/sizeof(uint65_t);
Surely you mean :
>
static const size_t array_size = sizeof(array) / sizeof(uint64_t);
>
Les messages affichés proviennent d'usenet.