Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference

+


Type:   -   function (subr)
Source:   -   xlmath.c

Syntax

(+ expr1 ...)
exprN - integer or floating point number/expression
returns - the result of adding the expressions

Description

The '+' function adds a list of numbers together and returns the result.

Examples

(+ 1)         => 1
(+ 1 2)       => 3
(+ 1 2 3)     => 6
(+ 1 2 3 4)   => 10
> (print (+ 1 2 (* 3.5 (/ 3.9 1.45))))
12.4138  ; screen output of PRINT
12.4138  ; return value

See  * ,  / , print. XLISP first prints the value on the screen, the second number is the return value.

See also:

  Back to Top


Nyquist / XLISP 2.0  -  Contents | Tutorials | Examples | Reference