[fpc-pascal] named parameter
Ewald
ewald at yellowcouch.org
Sun May 28 11:49:37 CEST 2017
On 27/05/17 11:26, Bernd Oppolzer wrote:
> it would be nice if you could specify a default value for the new
> third parameter and don't have to change all the callers that use
> only two.
>
[snip]
> procecure P (x : integer; y : boolean; c: char := ' ');
>
> the first two parameters are mandatory, the third is optional.
> Calls to P with 2 and 3 parameters are both valid.
You realize you can already do this, right?
See https://www.freepascal.org/docs-html/ref/refsu64.html#x176-19800014.4.1
--
Ewald
More information about the fpc-pascal
mailing list