Erlang – Is_Integer

Erlang is_integer

In this guide, we will discuss Erlang Is_Integer. The method checks if a number is an integer value.

Syntax

Is_Integer(X)

Parameters

X – A number value.

Return Value

The return value is true if the number specified as a parameter is a Integer value, else will return false.

For example

-module(helloworld). 
-export([start/0]). 

start() ->
   Num = 3, 
   io:fwrite("~w",[is_integer(Num)]).

Output

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

true

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply