Chief:
procedure themain(var da: text); var dataprism: ^trisquare; begin new (dataprism); writeln(output,' trimdiana -gpc bug',version:4:2); writeprism(da, dataprism^); dispose (dataprism); end;
The dataprism pointer is 4 bytes on a 32-bit system. I don't know its size on a 64-bit system (i.e., whether it is 4 or 8 bytes - probably the latter); "sizeof (pointer)" should give you that information.
Pointers (or, at least, what they point to) are allocated on the heap, so you will not overflow the stack like you did when you declared dataprism as a local trisquare variable. Using a pointer, you are only playing with 4 or 8 bytes on the stack, whereas, before, you were playing with 490mb (which would overflow any stack).
Thanks for explaining.
Tom
Thomas D. Schneider, Ph.D. Senior Investigator National Institutes of Health National Cancer Institute Frederick National Laboratory for Cancer Research Gene Regulation and Chromosome Biology Laboratory Molecular Information Theory Group Frederick, Maryland 21702-1201 schneidt@mail.nih.gov http://alum.mit.edu/www/toms