Call dynamically created function name

But back to main topic: So there is no way to call a function name which as been created dynamically by a string?

on contrary you can work around it and (sort of) call by name but it cost you extra overhead.

void callFuncByName(char *name, int param)
{
  if (strcmp(name, "func0")==0) func0(param);
  else if (strcmp(name, "func1")==0) func1(param);
  else if (strcmp(name, "func2")==0) func2(param);
  else if (strcmp(name, "func4")==0) func4(param);
}

Of course you can iterate over an array of function names or over an array of structs that contain the name and the functionpointer etc.

And yes comparing the reverse name would fail much faster :wink: