Skip to content
⌘ NSIS Forum Archive

IntOp Questions

4 posts

deguix#

IntOp Questions

1)
IntOp $0 1 $1 0
IntOp don't support variables in the "operation" field. But the System Plugin does:

System::IntOp64 1 $1 0
Pop $0
2)
IntOp $0 1 / 100
Result: 0
Right Result is: 0,01 or 0.01.

IntOp, nor System::IntOp64 support give results with comma (or dot).

Q) When will be implemented these in NSIS?
kichik#
1) The compiler won't be able to verify the right number of parameters if the op string is processed.

2) See http://forums.winamp.com/showthread....ighlight=intop for an explanation.
deguix#
1) I will continue using System Plugin.

2) It can be done, so will add it for "Advanced Integer Operation" Function, with a reduced support, in some weeks. (And rename it to "Advanced Mathematical Operation", good?)
brainsucker#
Math::Script "r0 = 1.0 / 100"
DetailPrint "$0"

will give you right result. If you like you could format it with ff():
Math::Script "result = 1.0 / 100; r0 = ff(result, 16+2)"

16 - no exponential view, 2 - 2 digits precision (after decimal point)