Hi All, Why can't use procedural type for declare a procedure\function? Why ever allow the exact same signature? It's uncomfortable Maybe it makes sense to introduce into the language such a possibility? For example such code: [code] type TMyCommand=function(arg1:TMyArg):TMyCommandResult begin ... end; function command1(arg1:TMyArg):TMyCommandResult; begin ... end; function command2(arg1:TMyArg):TMyCommandResult; begin ... end; function command100500(arg1:TMyArg):TMyCommandResult; begin ... end; var ... com:TMyCommand; ... com:=GetNeededCommand; res:=com(arg1:TMyArg) [/code]
Could look like this [code] type TMyCommand=function(arg1:TMyArg):TMyCommandResult begin ... end; command1 TMyCommand; begin ... end; command2 TMyCommand; begin ... end; command100500 TMyCommand; begin ... end; ... var com:TMyCommand; .. com:=GetNeededCommand; res:=com(arg1:TMyArg) [/code] -- Best regards, Zubarev mailto:zam...@gmail.com _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal