arithmetic.operators

Definition/BASIC Program, Releases: AP and R83

add, subtract, multiply, and divide numeric operands in arithmetic expressions.

Description

add, subtract, multiply, and divide numeric operands in arithmetic expressions.

The simplest arithmetic expression is a single numeric constant, variable, or function. More complex arithmetic expressions may combine two or more expressions using an arithmetic operator.

If a string value is used in an arithmetic expression, the Pick/BASIC runtime package attempts to convert it into a number. If it fails, '0' (zero) is used and a warning displays.

Example

total = (invoice.amount - discount) + tax

See Also

Command Name Type Description
basic.precision Statement Defines precision for calculations.
basic.arithmetic.expressions Definition Arithmetic expressions.
basic.precedence Definition Precedence of compound expressions.
basic.- Operator Mathematical operator (subtract). Also unary minus.
basic.*= Assignment Operator Multiplies numeric expression and assigns to variable.
basic.+= Assignment Operator Adds numeric expression and assigns to variable.
basic.-= Assignment Operator Subtracts numeric expression and assigns to variable.
basic./= Assignment Operator Divides numeric expression and assigns to variable.
basic.:= Assignment Operator Concatenates expression and assigns to variable.
basic.+ Operator Arithmetic operator (add). Also unary plus.
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.