/binary problem in R10B

Vance Shipley <>
Tue Nov 2 16:29:07 CET 2004


The following was taken verbatim from the programming examples
however it is giving me an error using R10B.

Eshell V5.4  (abort with ^G)
1> A = 1, B = 17, C = 42,
1> Bin2 = <<A, B, C:16>>.
<<1,17,0,42>>
2> <<D:16, E, F/binary>> = Bin2.
** exited: {{illegal_pattern,{bin,1,
                                  [{bin_element,
                                       1,
                                       {var,1,'D'},
                                       {integer,1,16},
                                       [integer,{unit,1},unsigned,big]},
                                   {bin_element,
                                       1,
                                       {var,1,'E'},
                                       {integer,1,8},
                                       [integer,{unit,1},unsigned,big]},
                                   {bin_element,
                                       1,
                                       {var,1,'F'},
                                       {atom,1,all},
                                       [binary,{unit,8},unsigned,big]}]}},
            [{erl_eval,expr,3}]} **

Checking with R9C-0 I see that it works as expected.

Eshell V5.3  (abort with ^G)
1> A = 1, B = 17, C = 42,
1> Bin2 = <<A, B, C:16>>.
<<1,17,0,42>>
2> <<D:16, E, F/binary>> = Bin2.
<<1,17,0,42>>


	-Vance



More information about the erlang-questions mailing list