Skip to content

Commit

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

///=== {
// ## math.Inc <变量名> <增量值>
// 将增量值叠加到变量原来的值之上。若变量值或增量值为空,则视同为 0。
// ## math.Inc <变量名> [<增量值>]
// 将增量值叠加到变量原来的值之上。若变量值为空,则视同为 0。如增量值省略,则视同为 1
// };
#alias {math.Inc} {
#local math.local.var {%1};
#local value {@defaultNum{%2;0}};
#local value {@defaultNum{%2;1}};
#math {$math.local.var} {@defaultNum{${$math.local.var};0} + $value};
};

Expand Down

0 comments on commit 179f443

Please sign in to comment.