cobines wrote:
ClrDebug(panels[i]) calls itself again and not

procedure ClrDebug(panel: integer)...

So stack overflow happens.

If you need it only for integers then declare it as:

procedure ClrDebug(const panels: array of integer)

Thanks. Making sure it couldn't recurse fixes half the problem, reverting to array of integer fixes the other but I'm not sure why that works when it didn't earlier (i.e. before I'd started using array of const).

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to