[fpc-pascal] assigning a local function to a var

Joao Morais post at joaomorais.com.br
Wed Jul 9 19:30:39 CEST 2008


David Emerson wrote:
>    var
>       // what should this be??
>       my_func : function (pass_str : ansistring) : boolean;

Declare a new type:

type
   tmy_func = function(pass_str: ansistring): boolean;

var
   my_func: tmy_func;

Joao Morais



More information about the fpc-pascal mailing list