Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 23rd January 2003, 19:31   #1
treaz
Member
 
Join Date: Jan 2003
Posts: 78
Question Variables

Hi,

I understand that we have 20 variables to play around with?

I was just wondering if my below code uses any of these variables and if it does, which does it use?

PHP Code:
!define var1 "" 
Thanks.
treaz is offline   Reply With Quote
Old 23rd January 2003, 19:33   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
No, it doesn't


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 23rd January 2003, 20:19   #3
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Defines are being processed on compile time. For example, when you add

!define TEMPVAR "$R0"

${TEMPVAR} will be replaced by $R0 when compiling.

If you want to use variables temporary, use Push/Pop:

Push $R0

...using $R0 as temp var...

Pop $R0
Joost Verburg is offline   Reply With Quote
Old 24th January 2003, 10:02   #4
virtlink
Major Dude
 
virtlink's Avatar
 
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
If you have to ask wether your code uses one of those 20 variables, you propably don't know what variables we're taking about. In paragraph 3.3.1 of the documentation (here), you can find those variables, ranging from $0 to $9 and $R0 to $R9. You don't have to declare/define the variables, so you don't have to use '!define'. You can, however, use 'StrCpy', found in the documentation here.

If you want to use one of those 20 variables 'twice', use Joost Verburg's code above.

You might already know this, then ignore my post.

"I'll quote you when you say something memorable."
- Claudia Pelsmaeker
virtlink is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump