Procedures/Functions can have default values for arguments, so they
don't need to be specified if called
function GetFoo(Bar: integer; XY: Boolean = True): Integer;
Properties (indexed) don't have such a syntax:
property Foo[Bar: integer; XY: Boolean = True] read GetFoo;
will give an error
However the follwing Syntax compiles fine:
function GetFoo(Bar: integer; XY: Boolean = True): Integer;
property Foo[Bar: integer; XY: Boolean] read GetFoo;
and then you can do:
a := Object.Foo[1];
But:
Is that supposed to work?
Because it can not be done for write access, as the last argument it the
value to be assigne, and that doesn't have a default value. And even if
it had, it requred the correct position => that is *all* param present.
Martin
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel