From b0860754c392a591389f5f35ee5458758f6db10f Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 2 Mar 2018 18:49:29 +0100 Subject: erts: Improve send/2 docs with link to ! operator and clarify ugly badarg for unregistered atom argument. --- erts/doc/src/erlang.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'erts/doc/src') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 771897ba94..ff0480291b 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -5700,11 +5700,17 @@ true

Sends a message and returns Msg. This - is the same as Dest ! Msg.

+ is the same as using the + send operator: + Dest ! Msg.

Dest can be a remote or local process identifier, a (local) port, a locally registered name, or a tuple {RegName, Node} - for a registered name at another node.

+ for a registered name at another node.

+

The function fails with a badarg run-time error if + Dest is an atom name, but this name is not + registered. This is the only case when send fails for an + unreachable destination Dest (of correct type).

-- cgit v1.2.3