请把轻狂志网址 www.flighty.cn 加入收藏夹,其他俱为假冒,谨防被骗!赞助请点 这里!找东东请用右边的搜索 ===>
14 2015-03

NSIS:使用Int64Op运算64位整数

作者:少轻狂 | 发布:2015-03-14 | 更新:2015-03-14 | 分类:部署 | Disposition | 热度:
Int64Op ARG1 OP [ARG2]
执行 ARG1 和选项 ARG2 之间的 OP 操作,返回值到堆栈顶。ARG1 和 ARG2 都是 64 位整数,这意味着它们可以处理从 -2^63 到 2^63 - 1 的整数。
 
有效的运算符:
加法:+
减法:-
乘法:*
除法:/
取模:%
位或:
位与:&
位异或:^
逻辑或:
逻辑与:&&
小于:<
大于:>
等于:=
位非 (单变量):~
逻辑非 (单变量):!
 
例子:
 
#轻狂志www.flighty.cn

OutFile "使用Int64Op运算64位整数.exe"
Name "使用Int64Op运算64位整数"
SetCompressor lzma
XPStyle on

Section
	System::Int64Op 5 + 5
	Pop $0
	DetailPrint "5 + 5 = $0" # 10

	System::Int64Op 64 - 25
	Pop $0
	DetailPrint "64 - 25 = $0" # 39

	System::Int64Op 526355 * 1565487
	Pop $0
	DetailPrint "526355 * 1565487 = $0" # 824001909885

	System::Int64Op 5498449498849818 / 3
	Pop $0
	DetailPrint "5498449498849818 / 3 = $0" # 1832816499616606

	System::Int64Op 0x89498A198E4566C % 157
	Pop $0
	DetailPrint "0x89498A198E4566C % 157 = $0" # 118

	System::Int64Op 0xF0F0F0F  0xF0F0FFF
	Pop $0
	DetailPrint "0xF0F0F0F  0xF0F0FFF = $0" # 0xF0F0FFF

	System::Int64Op 0x12345678 & 0xF0F0F0F0
	Pop $0
	DetailPrint "0x12345678 & 0xF0F0F0F0 = $0" # 0x10305070

	System::Int64Op 1 ^ 0
	Pop $0
	DetailPrint "1 ^ 0 = $0" # 1

	System::Int64Op 1  0
	Pop $0
	DetailPrint "1  0 = $0" # 1

	System::Int64Op 1 && 0
	Pop $0
	DetailPrint "1 && 0 = $0" # 0

	System::Int64Op 9302157012375 < 570197509190760
	Pop $0
	DetailPrint "9302157012375 < 570197509190760 = $0" # 1

	System::Int64Op 5168 > 89873
	Pop $0
	DetailPrint "5168 > 89873 = $0" # 0

	System::Int64Op 189189 = 189189
	Pop $0
	DetailPrint "189189 = 189189 = $0" # 1

	System::Int64Op 156545668489 ~
	Pop $0
	DetailPrint "1 ~ = $0" # -156545668490

	System::Int64Op 1 !
	Pop $0
	DetailPrint "1 ! = $0" # 0
SectionEnd

 

标签:NSIS(49)Int64Op(1)运算(1)整数(1)
评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)