[erlang-questions] why syntax error

Robert Virding rvirding@REDACTED
Wed Apr 14 20:27:52 CEST 2010

There is no no printed representation of pids (process ids) or ports
which can be read in to return the pid or port. So #Port<0.2808> and
<0.1112.0> is not valid syntax.

This is not accidental but deliberate as creating ports/pids in this
fashion is very unsafe and can really screw things up.


On 14 April 2010 19:44, Wes James <comptekki@REDACTED> wrote:
> I am trying to debug some yaws data.  yaws uses out(A)-> ..... to send
> data back to the browser.  I did an io:format of "A" to use it in just
> an .erl file.  The "A" data looks like this:
>        {arg,#Port<0.2808>,{{127,0,0,1},51598},......,<0.1112.0>,[],undefined,[47],undefined}
> So I have
> start() ->
>        Data={arg,#Port<0.2808>,{{127,0,0,1},51598},......,<0.1112.0>,[],undefined,[47],undefined},
>        out(Data).
> but when I do c(module) I get: Syntax error before Port.  If I change
> #Port<0.2808> to undefined then do c(module) again then I get syntax
> error before: '<'.  So I change <0.1112.0> to undefined and now it
> compiles fine.  Why doesn't #Port<0.2808> and <0.1112.0> pass the
> compile stage?
> thx,
> -wes
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED

More information about the erlang-questions mailing list