RE:mail not yet answered

Masaharu Goto (MXJ02154@niftyserve.or.jp)
Fri, 10 Jul 1998 19:50:00 +0900


Sean,

Sorry for delay in response.

About array of pointer to function in CINT,

Your code includes a couple of cint syntax limitations. With following
modification, your code works fine.

Masaharu Goto

--------------------------------------------------------------
#include <stdio.h>

// prototypes

inline int aCut0(float pLcl);
inline int aCut1(float pLcl);

typedef int (*MCUT)(float);
main (){
//typedef int (*MCUT)(float); no typedef in function scope
MCUT aCut[] = {aCut0, aCut1};
printf("%i\n",(*aCut[0])(0.0)); // (* ) needed for array of func ptr
printf("%i\n",(*aCut[1])(0.34));// (* ) needed for array of func ptr
//printf("%i\n",aCut[0](0.0));
//printf("%i\n",aCut[1](0.34));
printf("%i\n",aCut0(0.0));
printf("%i\n",aCut1(0.34));
}
inline int aCut0(float pLcl) { return (pLcl > -0.020 && pLcl < 0.020);}
inline int aCut1(float pLcl) { return (pLcl > 0.329 && pLcl < 0.369);}