Skip to content

Commit

Permalink
feat(xtintin): 增加别名 math.Inc
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Jan 16, 2024
1 parent 39ce08c commit 4cd4b48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/lib/xtintin/number.tin
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>)
};
};

///=== {
// ## 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 <中文数字串>
// 将中文数字串转换成十进制整数。
Expand Down

0 comments on commit 4cd4b48

Please sign in to comment.