我正在尝试使用NSIS Math Library执行Power
计算。我在编写Math库语法方面遇到了很多困难。
如何在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"
答案 0 :(得分:0)
它与C / C ++非常相似,定义一个计算XOR并返回结果的函数,试试;
Math::Script 'myxor(h,g) (h^g);'
之后,myxor(3,2)会给你3 XOR 2
= 1。