-: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary Tag: Manual revert |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
{{PageSyntax}} | |||
: {{Parameter|return_value}} = {{Parameter|number1}} [[-]] {{Parameter|number2}} | |||
{{PageDescription}} | {{PageDescription}} | ||
* Numbers used can be any literal or variable numerical value type. | * Numbers used can be any literal or variable numerical value type. | ||
* Subtracting a negative value will actually perform addition with the other value. | * Subtracting a negative value will actually perform addition with the other value. | ||
Line 16: | Line 14: | ||
{{PageSeeAlso}} | |||
* [[+|+ positive]] (addition operator) | |||
* [[Mathematical Operations]] | |||
[[+|+ positive]] (addition operator) | |||
[[Mathematical Operations]] | |||
{{PageNavigation}} | {{PageNavigation}} |
Latest revision as of 22:30, 31 January 2023
The - mathematical operator performs subtraction on two numerical values or negates a single value.
Syntax
- return_value = number1 - number2
Description
- Numbers used can be any literal or variable numerical value type.
- Subtracting a negative value will actually perform addition with the other value.
- Subtracting a negative or negated value will make the return value more positive.
- Addition and subtraction are the last operations performed in QBasic's normal order of operations.
- Subtraction cannot be performed on STRING values.
See also
- + positive (addition operator)
- Mathematical Operations