deguix
29th August 2003 16:40 UTC
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
29th August 2003 16:51 UTC
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
29th August 2003 17:00 UTC
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
2nd September 2003 12:12 UTC
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)