(no subject)

From: Anton Fokin (fokin@tsl.uu.se)
Date: Sun Feb 27 2000 - 19:22:31 MET


Hi Pasha,

I have had this solution in mind, but it doesn't look very nice if you are
going to call this function many times. On the other hand it seems that a
direct call is possible (ref to TF1, TMinuit). I also has noticed that the
following doesn work in compiled code. Can you guess why?

It say "something is found" and crashes then.

---

   gROOT->LoadMacro("test.txt");

   void (*MyFunc)();

   MyFunc = (void(*)())gROOT->GetGlobalFunction("Function",0,kTRUE);
   if (MyFunc) {
     printf("something is found\n");
     (*MyFunc)();
   }


test.txt ->

void Function {
  printf("Hello losers!\n");
}



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:20 MET