>I am trying to write a program that simulates a forest. With this I need
>an array that is able to keep track of about 90,000 trees. But I get a
>'too large' error when I try for anything over 4,000. Is there a way > to get around this in pascal?
The problem is not Pascal but DOS real mode, which places a limit of 64
kB on the size of any segment, including the data segment, of your
program. You can get around this by using dynamic data structures like
linked lists or binary trees, which are allocated on the Heap, rather
than in the data segment. There are two conditions to meet: Each record
of your data structure must be smaller then 64 kB, and all the data
must share the 640 kB DOS memory area with your program and DOS (and
the TP IDE, if you are running your program in there). Two ways around
this limitation: Use protected mode compilers (Borland Pascal, Delphi,
Gnu-Pascal...) or store the data in a kind of data base on the disk and
keep only an index in memory.