[erlang-bugs] erl rejects FQN that begin with a digit

Patrick Baggett baggett.patrick@REDACTED
Wed Oct 20 14:03:39 CEST 2010


That seems like an odd deficiency of the parser, or maybe just an artifact
of the language. I guess there isn't any support for treating name@REDACTED as a
single unit since it is trying to convert everything into atoms rather than
leaving it a string. Well, I won't say it is intuitive, but it does work.
Thanks

Patrick


On Wed, Oct 20, 2010 at 6:58 AM, Vlad Dumitrescu <vladdu55@REDACTED> wrote:

> On Wed, Oct 20, 2010 at 13:50, Patrick Baggett
> <baggett.patrick@REDACTED> wrote:
> > It seems Erlang doesn't like domain names that start with digits, in my
> > case, the domain "8fun.net"
> >
> > (host1@REDACTED)5> tut17:start_ping(host2@REDACTED).
> > * 1: syntax error before: 8
>
> Hi!
>
> Try enclosing the host name in single quotes, to make it a single atom:
>
> (host1@REDACTED)5> tut17:start_ping('host2@REDACTED').
>
> Otherwise each part delimited by a dot is scanned as an atom, and
> atoms can't begin with digits.
>
> best regards,
> Vlad
>


More information about the erlang-bugs mailing list