<br><font size=2 face="sans-serif">Hi!</font>
<br>
<br><font size=2 face="sans-serif">In my code I often use 2D arrays.</font>
<br><font size=2 face="sans-serif">Until today, I kept the maximum dimension
fixed to 400 * 300 points.</font>
<br><font size=2 face="sans-serif">How can I make allocatable columns of
ARBITRARY size?</font>
<br>
<br><font size=2 face="sans-serif">For simplicity here a 1D reduction of
the problem:</font>
<br>
<br><font size=2 face="sans-serif">This is what I have:</font>
<br>
<br><font size=2 face="sans-serif">CONST</font>
<br><font size=2 face="sans-serif">  MaxN = 400;</font>
<br><font size=2 face="sans-serif">TYPE</font>
<br><font size=2 face="sans-serif">  ColumnType = ARRAY[1..MaxN] OF
Float;</font>
<br>
<br><font size=2 face="sans-serif">Recently, some of my grids were so large
that having all my grids use the same maximum size</font>
<br><font size=2 face="sans-serif">would cost too much memory. Therefore,
I would like to dynamically allocate space</font>
<br><font size=2 face="sans-serif">when the actual dimensions of a grid
are known. I found:</font>
<br>
<br><font size=2 face="sans-serif">TYPE</font>
<br><font size=2 face="sans-serif">  ColumnTypePtr = ^ColumnType;
</font>
<br><font size=2 face="sans-serif">VAR</font>
<br><font size=2 face="sans-serif">  Column : ColumnTypePtr;</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">NEW(Column);</font>
<br>
<br><font size=2 face="sans-serif">and now I have a column of size 400.</font>
<br>
<br><font size=2 face="sans-serif">--> Question: How can I make allocatable
columns of ARBITRARY size?</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br>
<br>
<br><font size=2 face="sans-serif">Arjan</font>
<br>
<br>
<br><font size=3 face="sans-serif"><br>
</font><font size=1 color=blue face="Verdana"><u><br>
</u></font><a href=http://www.rivm.nl/disclaimer.htm target=_new><font size=1 color=blue face="Verdana"><u><br>
Disclaimer RIVM</u></font></a>