Skip to content
⌘ NSIS Forum Archive

Insufficient Variables

4 posts

treaz#

Insufficient Variables

Hi,

I understand we have $0, $1, $2,....$9 and $R1, $R2,...$R9 to use. That makes it 20 variables that can be used at any one time?

How do I clear or flush the variable after use or can I have more variables like $11 or $12?

Thanks.
Joost Verburg#
If you want to use a variable temporary, use the stack (Push/Pop).

Example:
Push $R0

...using $R0...

Pop $R0
And the variable will contain the same value before and after the lines of code.
kichik#
Yep, 20 variables are more than enough if you use them wisely. If you wish to flush them you can just copy "" to them (StrCpy $1 "") or use the Push/Pop method Joost mentioned.