[erlang-questions] Pid, port connection syntax
Thu Dec 14 20:03:21 CET 2006
On 12/14/06, <> wrote:
> I am looking for documentation that shows how to connect to port
> port_command(Port, Data) .... i know the port is the Pid,
> i have not been able to find format ....
> example PID <0.153>
> so is it port_command(< 0.153> or 0.153 or 153 or ...... man says PID but
> does not say the
> format of PID ... as from the shell i see most pids as <0.XXXX> ... so if
> some one can point to where in documentation I can find this information ...
You can't enter pids as text in a program. They are returned by spawn and
can be sent to other processes.
That said, there is a debugging feature that allows you to dynamically build
pids: the function c:pid(A,B,C) returns <A.B.C>. However, this is useless
except for debugging, since if you can't know A, B and C but from a pid you
received from elsewhere, so you can just as well use the pid directly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions