English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method is used to convert list items to atoms.
list_to_atom(listvalue)
listvalue −This is the list value that needs to be converted to an atom.
Atom based on list value input.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[list_to_atom("atom1")]).
The output of the above program is as follows.
atom1