Archive: Intop IntCmp


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


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


IntCmp "4.0" "3.8" jump_if_equal jump_if_val1_less jump_if_val1_more
See NSIS manual 4.9.4.13 IntCmp


would not work, as IntCmp compares integers, not floating point numbers.


Hi bholliger

Thanks very much. Problem is solved with verisoncompare.


Thanks