On Wed, 18 Sept 2024 at 19:51, Douglas McIlroy <
douglas.mcilroy(a)dartmouth.edu> wrote:
The array
size} limit that I found through trial and error is (2^15)-1.
Declaring an array that is [larger] results in an error of "Constant
required",
On its face, it states that anything bigger cannot be an integer constant,
which is reasonable because that's the largest (signed) integer value. Does
that version of C support unsigned constants?
I believe that it does support (16 bit) unsigned int, but I don't think
that it supports (32 bit) unsigned long, only signed long. That's a great
suggestion of a place to start. Following Nelson's suggestion, if there
need to be negative references in array accesses (which certainly makes
sense to me, on its face), it seems reasonable to have whatever
intermediate variable be signed.
-Henry