XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

abs


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

Syntax

(abs expr)
expr - integer or floating point number/expression
returns - the absolute value of the number

Description

The 'abs' function finds the absolute value of a number and returns the result.

Examples

(abs 1)       ; returns 1
(abs -99)     ; returns 99
(abs -99.9)   ; returns 99.9
(abs -32768)  ; returns 32768

Common Lisp: Common LISP supports a complex number data type which is not supported in XLISP.

See the abs function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next