Contributed samples and applications by Dr. Claudio Soto
A simple way to modify the cursor …
/
Division--binary (Mathematical)
------------------------------------------------------------------------------
Syntax
<nNumber1> / <nNumber2>
Type
Numeric
Operands
<nNumber1> is the dividend of the division operation.
<nNumber2> is the divisor of the division operation.
Description
The division operator (/) returns a numeric value from the division of
<nNumber1> by <nNumber2>.
Note: Dividing <nNumber1> with zero value for <nNumber2> results in
a runtime error.
Examples
. This example shows division results to 16 decimal places,
using different operands:
SET DECIMALS TO 16
? 3 / 0 // Result: Runtime error
? 3 / -2 // Result: -1.500000000
? -3 / 2 // Result: -1.500000000
? -3 / 0 // Result: Runtime error
? -1 / -3 // Result: +0.333333333
? -2 / 3 // Result: -0.666666667
? 2 / -3 // Result: -0.666666667
? 1 / -3 // Result: -0.333333333
See Also: % * ** + – = (compound) SET DECIMALS SET FIXED
*
Multiplication--binary (Mathematical)
------------------------------------------------------------------------------
Syntax
<nNumber1> * <nNumber2>
Type
Numeric
Operands
<nNumber1> and <nNumber2> are the two numeric expressions to
multiply.
Description
The multiplication operator (*) is a binary operator that returns a
numeric value from its operation on <nNumber1> and <nNumber2>.
Examples
. This example shows multiplication results using different
operands:
? 3 * 0 // Result: 0
? 3 * -2 // Result: -6
? -3 * 2 // Result: -6
? -3 * 0 // Result: 0
? -1 * 3 // Result: -3
? -2 * -3 // Result: 6
? 2 * -3 // Result: -6
? 1 * -3 // Result: -3
See Also: % ** + – / = (compound) SET DECIMALS SET FIXED