Caché MultiValue Basic Reference
Adds two floating point numbers.
||An expression that resolves to a numeric value.
function adds two numbers and returns the result. If a num
value is a null string or a non-numeric value, FADD
parses its value as 0 (zero).
You can perform the same operation using the addition operator (+). Refer to the Operators
page of this manual.
To perform arithmetic operations on floating point numbers, use the FADD
, and FDIV
functions, or use the standard arithmetic operators.
To perform arithmetic operations on numeric strings, use the SADD
, and SDIV
To perform integer division, use the DIV
function. To perform modulo division, use the MOD
To perform arithmetic operations on corresponding elements of dynamic arrays, use the ADDS
, and MODS
To add together the element values within a single dynamic array, use either the SUM
function (for single-level dynamic arrays) or the SUMMATION
function (for multi-level dynamic arrays).
To perform numeric comparison operations, use the SCMP
function, or use the standard comparison operators.
The following example uses the FADD
function to add two floating point numbers:
PRINT FADD(a,b); ! returns 22.2