Erlang-atom-to-binary

提供:Dev Guides
2020年6月23日 (火) 00:46時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

アーラン-atom_to_binary

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

構文

atom_to_binary(atom)

パラメーター

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

戻り値

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

例えば

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

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

出力

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

<<"Erlang">>