On Tue, Dec 22, 2009 at 14:42, Paul Ishenin <[email protected]> wrote:
> 22.12.2009 11:30, Flávio Etrusco wrote:
>>
>> Hi all,
>> I want to propose a syntax extension for the compiler to check
>> parameters' name on function/procure calls. Would such a patch be
>> accepted? Does anybody have a suggestion for the  syntax? (i guess
>> something along the line of a compiler directive to go together with
>> the parameter value to avoid syntax incompatibility...)
>
> You mean something like Basic has:
>
> CallSomething(Arg1=10, Arg2='Test') ?

I'd say rather something like

CallSomething(Arg1:=10, Arg2:='Test')

which is already sort-of-supported by Delphi for automation classes:

http://stackoverflow.com/questions/885942/named-optional-parameters-in-delphi

Extending such support to native procedures and functions
would be, in my opinion, a good idea.

-- 
Alexander S. Klenin
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to