[fpc-pascal] Default value for an open array
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Fri Jun 1 17:32:11 CEST 2012
kyan wrote:
>> However, given a declaration of that form, is it possible to define a
>> default parameter of [] so that OutputWriteF('Test, no params\n') is
>> valid?
>
> Not for open arrays, but you can write an overloaded version without
> the open array argument that calls the version with the open array
> parameter passing an empty array, or an array initialised with
> whatever "default" values you want:
Thanks, good point and adequate workaround.
--
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