ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   12 Numbers   12.2 Dictionary of Numbers

12.2.18 zerop Function

zerop number    generalized-boolean

[ 'zê(')rô(')pê ]

Arguments and Values:
number - a number.

generalized-boolean - a generalized boolean.

Returns true if number is zero (integer, float, or complex); otherwise, returns false.

Regardless of whether an implementation provides distinct representations for positive and negative floating-point zeros, (zerop -0.0) always returns true.

 (zerop 0)  true
 (zerop 1)  false
 (zerop -0.0)  true
 (zerop 0/100)  true
 (zerop #c(0 0.0))  true

Exceptional Situations:
Should signal an error of type type-error if number is not a number.

 (zerop number) ==(= number 0)

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. All Rights Reserved - File last updated 2022-07-25