Skip to content
⌘ NSIS Forum Archive

Intop IntCmp

5 posts

javadev#

Intop IntCmp

HI

I am very much new to NSIS.
I want to compare two values.But those are not integers.(for ex 3.8.0.6 and 3.9)
Now i want to compare those two values.I have tried with Intcmp But i didnot get the correct answer. May be it is only for integers.

Is there any way to compare two values which are not integers?

(I have tried with Intop also.Ex:
IntOp $8 4.0 - 3.8
MessageBox MB_OK "8: $8"
I am getting value 1 in $8.
)


Thanks
bholliger#
Hi javadev!

I think what you want to do is to compare two version numbers.

Here you are:

VersionCompare



Don't forget to use VersionConvert if you happen to have version numbers like 3.1a.



Have a nice day!

Cheers

Bruno
Red Wine#
IntCmp "4.0" "3.8" jump_if_equal jump_if_val1_less jump_if_val1_more
See NSIS manual 4.9.4.13 IntCmp