Did you implement the record exactly as shown? This error normally occurs
if you have fields in your record that you don't mention in your typed
const declaration.
{$mode objfpc} -> Error!
{$mode delphi} -> Ok!
...
type
TSetupFuncMapping = record
x: array of double;
name:string;
f
y
Op Wed, 10 Oct 2007, schreef Jilani Khaldi:
> > 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_
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';
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:
>
Hi All,
I have this program:
program mainfun;
{$mode objfpc}
uses
SysUtils;
type
SetupFun = function(const vect: array of double): double;
MyRec = record
x: array of double;
myFunName: ShortString; // function name to evoke
end;
function SetMeUp(const x1: array of double): double;
va