javadev
22nd November 2006 11:23 UTC
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
22nd November 2006 11:52 UTC
Hi javadev!
I think what you want to do is to compare two version numbers.
Here you are:
VersionCompare
http://nsis.sourceforge.net/Docs/AppendixE.html#E.3.16
Don't forget to use VersionConvert if you happen to have version numbers like 3.1a.
http://nsis.sourceforge.net/Docs/AppendixE.html#E.3.17
Have a nice day!
Cheers
Bruno
Red Wine
22nd November 2006 12:24 UTC
IntCmp "4.0" "3.8" jump_if_equal jump_if_val1_less jump_if_val1_more
See NSIS manual 4.9.4.13 IntCmp
Comm@nder21
22nd November 2006 16:34 UTC
would not work, as IntCmp compares integers, not floating point numbers.
javadev
24th November 2006 06:26 UTC
Hi bholliger
Thanks very much. Problem is solved with verisoncompare.
Thanks