Archive: Compare decimal numbers


Compare decimal numbers
  Hi all,

Maybe I am crazy, but this return false:

${if} 0.1 < 0.3

; Do something if true
>${else}
; Dosomething if false
>${endif}
Why is it?

NSIS doesn't handle decimal numbers. Both operands evaluate to 0.

Stu


I don't know if this is the best solution, but I've used this script to compare two versions of software.

http://nsis.sourceforge.net/Comparin...ersion_Numbers

Maybe it's not what you want to do, but you can achieve what you're looking for.


If you are comparing version numbers I would use VersionCompare.

Stu