该方法检查数字是否为整数值。
Is_Integer(X)
X - 一个数字值。
如果指定为参数的数字是Integer值,则返回值为true,否则将返回false。
-module(helloLearnfk). -export([start/0]). start() -> Num=3, io:fwrite("~w",[is_integer(Num)]).
当我们运行上述程序时,我们将得到以下输出。
true
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)