Clojure-float

提供:Dev Guides
2020年6月22日 (月) 22:43時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

Clojure-float?

数値がfloatの場合、trueを返します。

構文

構文は次のとおりです。

(float? number)

以下は、フロートテスト関数の例です。

(ns clojure.examples.hello
   (:gen-class))

;; This program displays Hello World
(defn Example []
   (def x (float? 0))
   (println x)

   (def x (float? 0.0))
   (println x))
(Example)

出力

上記のプログラムは、次の出力を生成します。

false
true