English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to convert binary values to atom values.
binary_to_atom(binaryvalue)
binaryvalue −This is the binary value that needs to be converted to an atom value.
Atom based on binary value.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[binary_to_atom(<<"Erlang">>, latin1)]).
Output Result
The output of the above program is as follows.
‘Erlang’