Erlang - atom_to_list



此方法用於將一個原子轉換為列表。

語法

Atom_to_list(atom)

引數

  • atom - 需要轉換為列表值的原子。

返回值

基於原子輸入的列表值。

例如

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

start() ->   
   io:fwrite("~p~n",[atom_to_list(atom1)]).

輸出

上述程式的輸出如下。

“atom1”
erlang_atoms.htm