Using Variables within the Alarm.timer functions

Is it possible to replace the 'function call' in the Alarm.timer library with a variable that contains the name of the function as indicated below?

String wzZ1;

wzZ1 = "Pump_on";

Alarm.timerRepeat(60,wzZ1);

void Pump_on()
{
//Turn on pump code
}

Many Thanks

No.

What is it that you are trying to achieve ?

Thanks for the prompt response.

I suppose I should have included the following

“If not is there a work-around to achieve A similar outcome and what is it?”

Many thanks.

PaulO9999:
“If not is there a work-around to achieve A similar outcome and what is it?”

UKHeliBob:
What is it that you are trying to achieve ?

You did not tell us what you want to achieve.

I am setting up a multi-zone watering scheduler and want to be able to change parameters from a keypad and need to modify the relevant Alarm.timer function parameters from within the code having read those parameters from an SD Card. That will include the alarm times as well as the “void function” name.
Many thanks.

I see no reason to use something like 'the "void function" name'.
Use a single function that selects its action by a global variable that you can set as you like.

There are no names in a C++ program after compilation, so your original plan will not work out.
Maybe on an ESP32 with MicroPython...

Thanks, Whandall, I will rethink my strategy

You COULD create an array of function pointers, and pass the nth element of the array to the timerRepeat() method, to make the nth function the one to be called when the timer fires.

PaulS, thanks for the suggestion. Unfortunately, I have no in depth experience with C++ so could you ‘point’ me in the direction with or of an example or two?
Many thanks.

Google search of 'c pointers' and 'c function pointers' returns lots of info. For example:

Pointers in general: C Pointers - GeeksforGeeks

Function pointers in particular: Function Pointer in C - GeeksforGeeks

Thanks to you, gfvalvo, I will set about some learning.