basic.-=

Assignment Operator/BASIC Program, Releases: AP 5.2.5

Subtracts numeric expression and assigns to variable.

Syntax

variable -= num.expression

Description

decrements a variable by a numeric expression.

Example

x -= 1
Subtracts one from the variable, 'x' and assigns the result to
'x'.

total -= tax
This is equivalent to the statement:
total = total - tax

See Also

Command Name Type Description
basic.+ Operator Arithmetic operator (add). Also unary plus.
basic.- Operator Mathematical operator (subtract). Also unary minus.
basic.precision Statement Defines precision for calculations.
basic.sum Function Returns the sum of a list of numbers
basic./= Assignment Operator Divides numeric expression and assigns to variable.
basic.operators Relational Operator Operators * ! & = # - + / ^ < > \ [ ] ( )
basic.arithmetic.expressions Definition Arithmetic expressions.
basic.:= Assignment Operator Concatenates expression and assigns to variable.
basic.num.expression Definition An expression which evaluates to a number.
basic.precedence Definition Precedence of compound expressions.
basic.assignment Definition Assigns value to variable.
arithmetic.operators Definition add, subtract, multiply, and divide numeric operands in arithmetic expressions.
basic.*= Assignment Operator Multiplies numeric expression and assigns to variable.
basic.+= Assignment Operator Adds numeric expression and assigns to variable.
basic.*.multiply Operator Arithmetic multiply operator

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.