[fpc-devel] property syntax extension
Inoussa OUEDRAOGO
inoussa12 at gmail.com
Thu Oct 18 20:27:20 CEST 2007
> property TransactionModel: TTransactionModel read FtransactionModel
> write SetTransactionModel attribute Engines: List =
> 'firebird,oracle,sybase-asa';
>
> much more logical ?
As attributes is meant to be used with allmost any construct( class,
field, property, method
orprocedure parametters, method or procedure, module... ), I think it
is a reasonable
syntax;
How would one apply attributes for example to parametters ( don't
forget that a parametter
can have one or more attributes )
Also note that this syntax does not add new keyword(s).
They borrow this syntax from C#
[AttributeForTheClass]
class SomeClass
{
[AttributeForTheField]
int SomeField;
[AttributeForTheMethod]
int SomeMethod(
[AttributeForTheParameter]int someParam)
{
...
}
}
--
Inoussa O.
More information about the fpc-devel
mailing list