basic.+

Operator/BASIC Program, Releases: AP and R83

Arithmetic operator (add). Also unary plus.

Syntax

num.expression + num.expression

Description

performs addition or indicates a positive numeric value.

Example

x = x + 1

Adds one to the variable, 'X'.

subtotal = price + tax

Adds the values in the variables 'price' and 'tax' and
assigns the result to 'subtotal'.

subtotal = tax + (unit.cost * qty)

This is a complex arithmetic statement which first multiplies the
'unit.cost' by 'qty' and then adds the results to the
variable called 'tax'. The parentheses '()' are used to
explicitly group precedence.

See Also

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