Sorry if I come back to you so soon, but I am really stuck with my activity due to this problem. Basically, what I need is a way to freely resize a bidimensional array inside a procedure without losing its contents. I can copy it over to another array, but in doing so I create another new array inside the procedure, and the heap is again filled up.
Is there a quick and not too difficult solution to this problem?
Thanks, bye
Silvio
On Tue, 2 Sep 2003, Silvio a Beccara wrote:
| Hi Frank, | | this would be useful, but I'd need it for at least a bidimensional array | (don't know whether the number of discriminants refer to the dimensions). | Could it be done? Would it set limits to the freedom of oter programmers? | | | >Since this way (new, copy, dispose) is a little cumbersome, I've | >thought about a built-in resize mechanism. However, I see no | >reasonable way to do it for arbitrary schemata. It would be easy to | >do with some rather strong restrictions on the structure of the | >schema, e.g.: The only dependence on the (one) discriminant is the | >upper bound of an array which is the last field in the schema | >(which, in fact, is the case almost everywhere in my code where I'd | >like to have this mechanism). In this case, all that would be | >required (internally, besides modification of the discriminant) is a | >`realloc' call. In the worst case, this will do the same as new, | >copy, dispose, but often it's more efficient (sometimes very much | >more so, especially with large data structures). | | >Frank | | | For the time begin, what do you suggest for me? | | Thanks, bye | | | Silvio | | |