最常用的BIF之一,返回调用进程的pid。
self()
返回调用进程的pid。
-module(helloLearnfk). -export([start/0]). start() -> io:fwrite("~p~n",[self()]).
当我们运行上述程序时,我们将得到以下输出。
链接:https://www.learnfk.comhttps://www.learnfk.com/erlang/erlang-self.html
来源:LearnFk无涯教程网
<0.2.0>
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)