basic.+
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
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
