|
|
On Tue, 22 Jan 2002 12:12:57 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> > Since checking of defined pointer is possible for entries of array then
> > undefinig should be possible also.
>
> No, it shouldn't. What would the suggested change do? Resize the array?
Documentation says: "Large uninitialized arrays do not take much memory.
Internally they are arrays of pointers so they probably use just 4 bytes per
element. Once initialized with values, they consume memory depending on what you
put in them."
So when I want undef entry it means imo: free memory pointed by this entry and
write NULL (or eqivalent) into this pointer/entry.
> You can
> undef the array, which is exactly what you are supposed to be able to do.
If it is really feature request then sorry but I think it is large wasting of
memory in this case. Imagine large array of points. For some reason to determine
important points I have to calculate them all. But when they calculated I don't
need not important points so I want undef part of entries fo save memory for
next purposes. All workarounds with external file or rewriting array slows
parsing a lot. But if it is really feature request then sorry again.
> It has never been stated that you can undef array elements.
6.2.2.4 says: "You may however un-define an identifier using the #undef
directive." So what is identifier ? 6.2.2.1 answers imo that identifier is
everything what can be declared. Entry of array can be declared and can be
tested via ifdef(), ifndef(), defined().
ABX
Post a reply to this message
|
|