[fpc-pascal] Error: Identifier not found "Heap Error"

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Oct 17 14:51:16 CEST 2016


Luiz Gonzaga de Oliveira Neto wrote:
> Would be it be better to try to compile this with the Turbo Pascal
> compiler then? Or do you think it would be easier to try to remove the
> lines with these codes and continue with FPC? My fear is that in some of
> these modifications I change what the code was supposed to do.

As the link that Bart posted explains
(http://putka.upm.si/langref/turboPascal/0683.html ), HeapError is a
pointer to a function that would be called when you're out of memory.
That happened quite regularly if all you had was 640KB, but it is
extremely unlikely to happen if you are running that same program on the
same inputs on a 32 or even 64 bit platform.

If that would happen anyway, then by default FPC will terminate your
program with a Run-time error 204. You can then still look at what the
original program did if it ran out of memory and try to do the same in a
more preventative way, if it did not simply use that HeapError function
pointer to print a (more user-friendly) error message and terminate as well.


Jonas



More information about the fpc-pascal mailing list