mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-01 07:00:15 +00:00
31 lines
1.1 KiB
Text
31 lines
1.1 KiB
Text
|
{{QBDLDATE:07-31-2022}}
|
||
|
{{QBDLTIME:23:54:00}}
|
||
|
The '''+''' plus mathematical operator performs addition on two numerical values or [[concatenation|concatenate]] [[STRING]] values.
|
||
|
|
||
|
|
||
|
|
||
|
''Syntax:'' return_value = number1 + number2
|
||
|
|
||
|
|
||
|
|
||
|
{{PageDescription}}
|
||
|
* A [[+]] sign also can indicate a positive numerical value, but it is not required.
|
||
|
* Numbers used can be any literal or variable numerical value type.
|
||
|
* Adding one negative value will actually perform subtraction on the other value.
|
||
|
* Adding two negative values will make the return value more negative.
|
||
|
* Addition and subtraction are the last operations performed in QBasic's normal order of operations.
|
||
|
* The [[+|plus(+)]] operator can also be used to add ([[concatenation|concatenate]]) literal or variable [[STRING]] values.
|
||
|
* [[PRINT]] can also use + operations on string values ONLY! Numerical values will need to be converted to strings first or be included using [[semicolon]]s or [[comma]]s instead.
|
||
|
|
||
|
|
||
|
|
||
|
''See also:''
|
||
|
|
||
|
[[-|- minus]] (subtraction or [[negation]] operator)
|
||
|
|
||
|
[[Mathematical Operations]]
|
||
|
|
||
|
|
||
|
|
||
|
{{PageNavigation}}
|