目录

integer?

如果数字是整数,则返回true。

语法 (Syntax)

以下是语法。

(integer? number)

例子 (Example)

以下是整数测试函数的示例。

(ns clojure.examples.hello
   (:gen-class))
;; This program displays Hello World
(defn Example []
   (def x (integer? 0))
   (println x)
   (def x (integer? 0.0))
   (println x))
(Example)

输出 (Output)

上述程序产生以下输出。

true
false
↑回到顶部↑
WIKI教程 @2018