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

Erlang Atom atom_to_binary Method

Erlang Atom

This method is used to convert an atom to a binary value.

Syntax

atom_to_binary(atom)

Parameter

  • atom −Atom that needs to be converted to a binary value.

Return Value

Binary value based on the atomic value.

-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~p~n",[atom_to_binary('Erlang', utf8)]).

Output Result

The output of the above program is as follows.

<<"Erlang">>

Erlang Atom