Skip to content
⌘ NSIS Forum Archive

recurse functions

3 posts

trankyfunky#

recurse functions

I'm writing a little tool for walking the Windows registry tree, and my question is: can I use function recursion?
And, if yes, maybe someone could explain me more exactly the meaning of a "local value" ($R1-$R9)?
Could I use these variables and forget to push/pop them?

thanks in advance...
Joost Verburg#
There is no difference between $0-$9 and $R0-R9. You only have to push/pop 'em if you want to get the original value back when your function is ready.
kichik#
To use recursion you have to push them. They were named local so people will use them in local functions and then forget about Push/Pop, but that didn't work so they are just used everywhere. BTW, there is a recursion example in Examples\rtest.nsi.