add/ja: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Languages|add}}{{Translation}} {{MacroFunction |name=add |trusted=false |version=1.3.b48 |description=<!--Adds number and/or strings together. If all of the arguments to the...") |
No edit summary |
||
Line 14: | Line 14: | ||
</source> | </source> | ||
|examples= | |examples= | ||
====数値====<!--Number--> | ====数値====<!--Number--> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> |
Revision as of 14:10, 31 July 2021
add() Function
• Introduced in version 1.3.b48
数値や文字列を加える。関数のすべての引数が数字であれば、数値の加算が行われ、いずれかの引数が文字列であれば、すべての引数が文字列として連結される。
Usage
[h: result = add(val1, val2, ...)]
[h: result = sum(val1, val2, ...)]
[h: result = concat(val1, val2, ...)]
Examples
====数値====
戻り値:
戻り値:
戻り値:
[r: add(1,4)]
5
文字列
[r: add("Mary", "had", "a", "little", "lamb")]
"Maryhadalittlelamb"
数値と文字列
[r: add(1,"4")]
"14"