From 4cd4b481e634682dd53885b815266a40943c902a Mon Sep 17 00:00:00 2001 From: dzp Date: Tue, 16 Jan 2024 03:39:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(xtintin):=20=E5=A2=9E=E5=8A=A0=E5=88=AB?= =?UTF-8?q?=E5=90=8D=20math.Inc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/lib/xtintin/number.tin | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/lib/xtintin/number.tin b/plugins/lib/xtintin/number.tin index fea70e84..cd780536 100644 --- a/plugins/lib/xtintin/number.tin +++ b/plugins/lib/xtintin/number.tin @@ -153,6 +153,16 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp ) }; }; +///=== { +// ## math.Inc <变量名> <增量值> +// 将增量值叠加到变量原来的值之上。若变量值或增量值为空,则视同为 0。 +// }; +#alias {math.Inc} { + #local math.local.var {%1}; + #local value {@defaultNum{%2;0}}; + #math {$math.local.var} {@defaultNum{${$math.local.var};0} + $value}; +}; + ///=== { // #@ math.ParseCN <中文数字串> // 将中文数字串转换成十进制整数。