[fpc-pascal] Unknown runtime error 202
JeLlyFish.software at gmx.net
Wed Jul 26 18:34:59 CEST 2006
Wolfram Kläger wrote:
> I had this error two or three times these days. I managed to get rid
> of it by moving a local method variable to a field. Example:
> d3 : array[ .., .., ..] of ...
> Works, if length(d3) < unknown limit. When I get the unknown runtime
> error 202 instead, I rearrange d3 to
> ... class
> Fd3 : array ...
> Then it works again. Apparently for unlimited array sizes. But what is
> the secret, where is the limit? And if this secret / limit is known,
> why the error is not?
Well, I don't know why exactly it is displayed as "Unknown runtime
error", but I hit that several times myself. Fortunately I still
remember the good old Turbo Pascal days, where number 202 was a stack
overflow error, and from my findings - when it happened to my code - it
still is. Highly recursive routines with a wrong or even missing
termination condition have never been a good idea. ;)
To answer your question: According to the documentation, the size of the
local variables (allocated on the stack) should not exceed 32 KiBytes
for portability reasons. So if you need more, it just depends on how
much the target architecture is able to supply.
So it's probably a better idea to allocate anything larger than that
from the heap.
More information about the fpc-pascal