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

Erlang Atom is_atom Method

Erlang Atom

This method is used to determine whether an item is indeed an atom.

Syntax

is_atom(term)

parameter

  • term −This is the value of the item to be calculated to determine whether it is an atom.

Return Value

If the computational item is an atom, it returns true, otherwise it returns false.

For example

-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite(atom1), 
   io:fwrite("~n"), 
   io:fwrite("~p~n",[is_atom(atom1)]).

The output of the above program is as follows.

atom1
true

Erlang Atom