Recursion with independent variables

I want to make the macro call itself. I achieved this, but the problem is according to this RUN = Test Case Reuse - Selenium IDE Commands Tutorial

  • If the value of a variable is changed in the subroutine, it changes the value in the main macro, too (“Call by reference”).

I need a different copy of the variable to be created for each call. I want each call to remember its variables. How to achieve this? does not support recursion?

Inside the subroutine you can copy the main program variable into a new variable and then change this one:

store | ${VariableFromMain} | Variable_to_be_changed

How this will help in case of 4 nested calls? This new variable will not be overwrited?