[erlang-questions] Bit String Comprehension Question
Grasl Christoph
C.Grasl@REDACTED
Tue Sep 9 16:55:18 CEST 2008
Dear, David
[Bin || Bin <- [<<3:5>>] ].
works fine..
the syntactical notation for a list comprehension needs to be in '[' & ]'
whereas you have used the binary/bitstring syntax to 'bracket' your comprehension
together with the '||', which is typically a list-comp.
could be mistaken, but it looks like u'r mixing up to notations..
Cheers,
Christoph Grasl
Embedded Software Entwickler
KEYTRONIX
Gesellschaft für industrielle Elektronik und Informationstechnologie mbH
Ungargasse 64-66/1/109
A-1030 WIEN
E-Mail: c.grasl@REDACTED
Tel.: +43 (1) 718 06 60 - 323
Mobil: +43 (664) 8556456
WWW: http://www.keytronix.com
HG Wien FN 261131t
Confidentiality Notice:
This message may contain privileged and confidential information. If you think, for any reason, that this message may have been addressed to you in error, you must not disseminate, copy or take any action in reliance on it, and we would ask you to notify us immediately by return email.
-----Ursprüngliche Nachricht-----
Von: erlang-questions-bounces@REDACTED im Auftrag von David Mercer
Gesendet: Di 09.09.2008 16:18
An: 'erlang-questions'
Betreff: [erlang-questions] Bit String Comprehension Question
Why does the bit-string comprehension #133 below work whereas #134 is a
syntax error?
133> << <<X:N>> || {X,N} <- [{3,5}] >>.
<<3:5>>
134> << Bin || Bin <- [<<3:5>>] >>.
* 1: syntax error before: '||'
Please advise. Thank-you.
David Mercer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080909/54c3d283/attachment.htm>
More information about the erlang-questions
mailing list