[fpc-pascal] Default value for an open array

2012-06-01 Thread Mark Morgan Lloyd
It's previously been pointed out to me that a declaration such as procedure OutputWriteF(const str: widestring; values: array of const; fg: TColor= clBlack; bg: TColor= clDefault); can't be rewritten type owfArray: array of const; procedure OutputWriteF(const str: widestring; values:

Re: [fpc-pascal] Default value for an open array

2012-06-01 Thread kyan
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

Re: [fpc-pascal] Default value for an open array

2012-06-01 Thread Mark Morgan Lloyd
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