Lotusscript如何只显示几十位数字
Lotusscript how to display only tens of numbers
在我的 LotusScript 代码中有一个进度指示器:
docCount = AllDocs.Count
current = 0
Print Cstr(Round(current / docCount * 100, 0)) + "% copied"
我想通过只显示几十个数字来减少 Print 语句的数量,例如
10% 复制
20% 复制
我该怎么做?有没有办法检查一个数字是否是整数?
下面的示例有点快速和肮脏,但基本上您可以使用模运算来实现:
If (Round(current / docCount*100,0) Mod 10) = 0 then
do your print
end if
在 LotusScriopt 中,模数是使用设计器帮助中记录的 Mod 运算符实现的:
https://www.ibm.com/support/knowledgecenter/en/SSVRGU_9.0.1/basic/LSAZ_MOD_OPERATOR.html
在我的 LotusScript 代码中有一个进度指示器:
docCount = AllDocs.Count
current = 0
Print Cstr(Round(current / docCount * 100, 0)) + "% copied"
我想通过只显示几十个数字来减少 Print 语句的数量,例如 10% 复制 20% 复制
我该怎么做?有没有办法检查一个数字是否是整数?
下面的示例有点快速和肮脏,但基本上您可以使用模运算来实现:
If (Round(current / docCount*100,0) Mod 10) = 0 then
do your print
end if
在 LotusScriopt 中,模数是使用设计器帮助中记录的 Mod 运算符实现的: https://www.ibm.com/support/knowledgecenter/en/SSVRGU_9.0.1/basic/LSAZ_MOD_OPERATOR.html