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

Erlang Binary binary_to_atom Method

Erlang Binary Files

This method is used to convert binary values to atoms.

Syntax

binary_to_atom(binaryvalue)

Parameter

  • binaryvalue −This is the binary value that needs to be converted to an atom.

Return Value

Return an atom.

-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~p~n",[binary_to_atom(<<"Erlang">>, latin1)]).

Output Result

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

‘Erlang’

Erlang Binary Files