0

我正在尝试使用NSIS 数学库来执行Power计算。我在制定数学库语法时遇到了很多困难。

如何在 NSIS 中执行此计算:h ^= g;

Var h # example variables
Var g
Var a

# I am attempting to perform the following calculations in NSIS.
# I'm not sure how exactly to do it using the math library syntax?
# Do I need to include the Math.nsh library to use it?
# h ^= g;

# My attempt:
Math::Script "a = $h; b = $g; c = ?? a = Power(a,b,c); R0 = a"
4

1 回答 1

0

和C/C++很像,定义一个计算异或并返回结果的函数,试试;

Math::Script 'myxor(h,g) (h^g);'

之后 myxor(3,2) 会给你3 XOR 2= 1。

于 2013-01-16T09:54:29.840 回答