a plus b: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (moved to template) |
||
Line 3: | Line 3: | ||
[[Category:Scripting Commands OFP 1.46|#]] | [[Category:Scripting Commands OFP 1.46|#]] | ||
[[Category:Scripting Commands ArmA|#]] | [[Category:Scripting Commands ArmA|#]] | ||
{{Command|= Comments | |||
____________________________________________________________________________________________ | |||
| ofp |= Game name | |||
|1.00|= Game version | |||
____________________________________________________________________________________________ | |||
|For numbers: '''a''' added to '''b'''. | |||
For strings: All the characters in '''a''' and the characters in '''b''' are added together. | |||
For arrays: Contents of '''a''' and the contents of '''b''' are added together.|= Description | |||
____________________________________________________________________________________________ | |||
|''' ''a'' + ''b'' ''' |= Syntax | |||
|p1 = a: [[Number]], [[String]] or [[Array]] | |||
|p2 = b: [[Number]], [[String]] or [[Array]] | |||
| [[Number]], [[String]] or [[Array]] |= Return value | |||
____________________________________________________________________________________________ | |||
|x1 = <code>[[Number]]</code><br>_result <nowiki>=</nowiki> 1 '''+''' 2 | |||
_result is 3 | |||
|x2 = <code>[[String]]</code><br>_result <nowiki>=</nowiki> "He" '''+''' "llo" | |||
_result is "Hello" | |||
|x3 = <code>[[Array]]</code><br>_result <nowiki>=</nowiki> [1] '''+''' [2] | |||
_result is [1,2] | |||
| [[Array]] |= See also | |||
}} | |||
<h3 style="display:none">Notes</h3> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<!-- Note Section END --> | |||
</dl> | |||
<h3 style="display:none">Bottom Section</h3> | |||
Revision as of 04:24, 12 August 2006
Description
- Description:
- For numbers: a added to b. For strings: All the characters in a and the characters in b are added together. For arrays: Contents of a and the contents of b are added together.
- Groups:
- Uncategorised
Syntax
- Syntax:
- a + b
- Parameters:
- a: Number, String or Array
- b: Number, String or Array
- Return Value:
- Number, String or Array
Examples
- Example 1:
Number
_result = 1 + 2 _result is 3- Example 2:
String
_result = "He" + "llo" _result is "Hello"- Example 3:
Array
_result = [1] + [2] _result is [1,2]
Additional Information
- See also:
- Array
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
a + b
Operand types:
Type of returned value:
Description:
For numbers: a added to b.
For strings: All the characters in a and the characters in b are added together.
For arrays: Contents of a and the contents of b are added together.
See also. Array
Examples:
Number
_result = 1 + 2 ........ _result is 3
String
_result = "He" + "llo" ........ _result is "Hello"
Array
_result = [1] + [2] ........ _result is [1,2]