このメソッドは、バイナリ値をアトム値に変換するために使用されます。
binary_to_atom(binaryvalue)
バイナリ値に基づくアトム。
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[binary_to_atom(<<"Erlang">>, latin1)]).
上記のプログラムの出力は次のとおりです。
‘Erlang’