Skip to content
⌘ NSIS Forum Archive

StrCmp works ok with numbers?

2 posts

l_d_allan#

StrCmp works ok with numbers?

I've been using StrCmp to compare numbers, and just realized that perhaps I should be using IntCmp.

This seems to work fine, but perhaps ignorance is not bliss:

StrCmp $R0 1 RegIsOne RegIsNotOne
RegIsOne:
; do something
GoTo PastTest
RegIsNotOne:
; do something else
PastTest:
With numbers, are StrCmp and IntCmp equivalent? If not, what is the difference, and is IntCmp preferred?
dienjd#
I ran across this thread the other day, and I think it covers your question:

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.