目录

atom_to_binary

此方法用于将原子转换为二进制值。

语法 (Syntax)

atom_to_binary(atom)

参数 (Parameters)

  • atom - 需要转换为二进制值的atom。

返回值 (Return Value)

基于原子值的二进制值。

例如 (For example)

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

输出 (Output)

上述程序的输出如下。

<<"Erlang">>
↑回到顶部↑
WIKI教程 @2018