[fpc-pascal] Use a procedural type for declare a procedure\function
Michael Van Canneyt
michael at freepascal.org
Thu Apr 20 11:40:11 CEST 2017
On Wed, 19 Apr 2017, Andrey M, Zubarev wrote:
> 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:
> type TMyCommand=function(arg1:TMyArg):TMyCommandResult
> command1 TMyCommand;
You can do this already using a macro
type TMyCommand = function mysig;
function command1 mysig;
More information about the fpc-pascal