English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang 进程 pid_to_list 方法

Erlang 进程

它将进程 id 转换为列表。

语法

Pid_to_list(processid)

参数

  • processid −这是需要转换为列表的进程 id。

返回值

从进程 id 返回列表。

-module(helloworld). 
-export([start/0, call/2]). 
call(Arg1, Arg2) ->
   io:format("~p ~p~n", [Arg1, Arg2]). 
start() ->
   Pid = spawn(?MODULE, call, ["hello", "process"]), 
   io:fwrite("~p~n",[pid_to_list(Pid)]).

当我们运行上面的程序时,我们将得到以下结果。

"<0.55.0>"
"hello" "process"

Erlang 进程