add: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) No edit summary |
Verisimilar (talk | contribs) No edit summary |
||
Line 33: | Line 33: | ||
}} | }} | ||
[[Category:Mathematical Function]] | [[Category:Mathematical Function]] | ||
[[Category:String Function]] |
Revision as of 22:20, 6 March 2009
add() Function
Adds number and/or strings together. If all of the arguments to the function are numbers then a numeric addition is performed, if any of the arguments are strings then all of the arguments are concatenated as a string.
Usage
[h: result = add(val1, val2, ...)]
[h: result = sum(val1, val2, ...)]
[h: result = concat(val1, val2, ...)]
Examples
====Numbers====
Returns:
Returns:
Returns:
[r: add(1,4)]
5
Strings
[r: add("Mary", "had", "a", "little", "lamb")]
"Maryhadalittlelamb"
Numbers and Strings
[r: add(1,"4")]
"14"