目录

self

最常用的BIF之一,返回调用进程的pid。

语法 (Syntax)

self()

参数 (Parameters)

没有

返回值 (Return Value)

返回调用进程的pid。

例如 (For example)

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

输出 (Output)

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

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