Op Wed, 10 Oct 2007, schreef Jilani Khaldi:
> {////////////////////////////////////////////////
> Is there a way to "connect" the name of the function as a string "evoke" to
> the true function "evokeFun: SetupFun;" getting a new function
> "newEvokeFun: SetupFun;" so I can write:
> ////////////////////////////////////////////////}
Create a table with function names and the actual function, for example:
type Tsetupfunc_mapping=record
name:string;
func:setupfunc;
end;
const setupfunc_mapping:array[0..2] of Tsetupfunc_mapping=(
(name:'setup_function_1';func:@setup_function_1),
(name:'setup_function_2';func:@setup_function_2),
(name:'setup_function_3';func:@setup_function_3));
Then search the name of the function you want to call in the table, then
call the function in the "func" field.
Daniël
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal