a plus b: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
'''Operand types:'''
'''Operand types:'''


'''a:''' [[Number]] or [[String]] or [[Array]]
'''a:''' [[Number]], [[String]] or [[Array]]


'''b:''' [[Number]] or [[String]] or [[Array]]
'''b:''' [[Number]], [[String]] or [[Array]]


'''Type of returned value:'''
'''Type of returned value:'''


Either [[Number]] or [[String]] or [[Array]]
[[Number]], [[String]] or [[Array]]


'''Description:'''
'''Description:'''
For numbers, '''a''' added to '''b'''. For strings, all the characters in '''a''' followed by all the charaters in '''b'''. For arrays, all the elements of '''a''' followed by all the elements of '''b'''<br>
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.<br>
 
''See also.'' [[Array]]  
''See also.'' [[Array]]  



Revision as of 15:14, 19 April 2006

back to COMREF

a + b


Operand types:

a: Number, String or Array

b: Number, String or Array

Type of returned value:

Number, String or Array

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]