[fpc-pascal] Open vs dynamic arrays

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Sun Apr 22 11:46:48 CEST 2012

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]

More information about the fpc-pascal mailing list