Thomas Schneider wrote:
When I set it to 2003001 it compiles but gives a segmention fault even though it's global. Maybe there's a limitation to allocating that way?
Then I switched dataprism to be a pointer using 'dataprism: ^trisquare;' as you suggested and changed the calls to be 'dataprism^' (a rather cute trick!) and ... it compiles but still gives me a segmentation fault!
Actually, I was able to reproduce this crash. It happened at the point of "dispose (dataprism)". I changed the memory allocation/deallocation calls, and all works well (with "trimax=8006000"):
procedure themain(var da: text); var dataprism: ^trisquare; (* the data structure for diana *) begin getmem (dataprism, sizeof (trisquare)); writeln(output,' trimdiana -gpc bug',version:4:2); writeprism(da, dataprism^); freemem (dataprism, sizeof (trisquare)); end;
begin writeln ('sizeof trisquare=', sizeof (trisquare) div 1024 div 1024, 'mb'); themain(da); end.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/