Erlang-atom-to-binary

提供:Dev Guides
移動先:案内検索

アーラン-atom_to_binary

このメソッドは、アトムをバイナリ値に変換するために使用されます。

構文

atom_to_binary(atom)

パラメーター

  • atom -バイナリ値に変換する必要があるアトム。

戻り値

アトム値に基づくバイナリ値。

例えば

-module(helloworld).
-export([start/0]).

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

出力

上記のプログラムの出力は次のようになります。

<<"Erlang">>