binary constructor

Mats Cronqvist <>
Fri Feb 25 17:23:13 CET 2005


  so i read this in the reference manual 
(http://www.erlang.se/doc/doc-5.4/doc/reference_manual/part_frame.html);

<<E1,...,En>>

Ei = Value |
      Value:Size |
      Value/TypeSpecifierList |
      Value:Size/TypeSpecifierList

used in a binary construction, Value is an expression which should evaluate to 
an integer, float or string. If the expression is something else than a single 
literal or variable, it should be enclosed in parenthesis.


   this leads me to believe i should be able to do this;

A = "123",
<<A>>.

   alas, i get a badarg.
   can somone please point out my mistake?

   mats



More information about the erlang-questions mailing list