
最常用的BIF之一,返回调用进程的pid。
语法
self()
参数
没有任何
返回值
返回调用进程的pid。
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("~p~n",[self()]).当我们运行上面的程序时,我们将得到以下结果。
<0.2.0>

最常用的BIF之一,返回调用进程的pid。
self()
没有任何
返回调用进程的pid。
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("~p~n",[self()]).当我们运行上面的程序时,我们将得到以下结果。
<0.2.0>