Negation: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "'Negation is the process of changing the sign of a positive number to negative. Usage: number% = -number% Negation can be performed by adding a negative (- minus) sign to a number or by multiplying or dividing a number by any negative value. If a negative value is negated, the value of the number becomes positive.")
 
No edit summary
Line 7: Line 7:
Negation can be performed by adding a negative (- minus) sign to a number or by multiplying or dividing a number by any negative value.
Negation can be performed by adding a negative (- minus) sign to a number or by multiplying or dividing a number by any negative value.
If a negative value is negated, the value of the number becomes positive.
If a negative value is negated, the value of the number becomes positive.
See also:
* multiplication, / division
\ Integer division

Revision as of 21:56, 20 April 2022

'Negation is the process of changing the sign of a positive number to negative.


Usage: number% = -number%


Negation can be performed by adding a negative (- minus) sign to a number or by multiplying or dividing a number by any negative value. If a negative value is negated, the value of the number becomes positive.

See also:

  • multiplication, / division

\ Integer division