English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang Number is_integer Method

Numbers in Erlang

This method checks if the number is an integer value.

Syntax

Is_Integer(X)

Parameter

X-A numeric value.

Return Value

If the number specified as a parameter is an Integer value, the return value will be true, otherwise it will return false.

-module(helloworld). 
-export([start/0]). 
start() ->
   Num = 3, 
   io:fwrite("~w",[is_integer(Num)]).

When we run the above program, we will get the following results.

true

Numbers in Erlang