[erlang-questions] Why is this expression illegal?
Brujo Benavides
elbrujohalcon@REDACTED
Fri Jan 18 15:08:19 CET 2019
I believe that inline operators (like bor) are disallowed in binary constructions. See…
1> << 1 bor 16 >>.
* 1: syntax error before: 'bor'
1> << 1 band 16 >>.
* 1: syntax error before: 'band'
1> << (1 band 16) >>.
<<0>>
Brujo Benavides <http://about.me/elbrujohalcon>
> On 18 Jan 2019, at 11:04, Jeroen Koops <koops.j@REDACTED> wrote:
>
> Hi List!
>
> If this expressions is legal:
>
> case A of foo -> 1; bar -> 2 end bor case A of foo -> 8; bar -> 16 end.
>
> ... and this expression is legal:
>
> << case A of foo -> 1; bar -> 2 end >>.
>
> ... then why is this expression illegal:
>
> << case A of foo -> 1; bar -> 2 end bor case A of foo -> 8; bar -> 16 end >>.
>
> (shell responds with "* 1: syntax error before: 'bor'")
>
> Thanks,
>
> --
> Jeroen Koops
>
> M: koops.j@REDACTED <mailto:koops.j@REDACTED>
> T: +31-6-55590300
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190118/af1dc638/attachment.htm>
More information about the erlang-questions
mailing list