English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Erlang Distributed Programming
This is used to determine the value of the node on which the process needs to run. Since distributed programming is used to run functions on different nodes, this function comes in handy when programs need to be run on different machines.
node()
No parameters
This will return the name of the local node.nonode@nohostReturn if the node is not distributed.
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p",[node()]).
Output Result
When we run the above program, we will get the following results.
nonode@nohost