[erlang-questions] doc: error in the example for bit string comprehension

igwan <>
Wed Dec 5 18:25:23 CET 2007


Hi

The example given in 6.23 of the Erlang Reference Manual in R12B-0 reads :

1> *<< << X*2 >> || 
<<X>> <= << 1,2,3 >> >>.*
<<2,4,6>>

But it gives the error : * 1: syntax error before: '*'

It seems that the parenthesis around X*2 were ommited

1> << << (X*2) >> || <<X>> <= << 1,2,3 >> >>.
<<2,4,6>>

works as expected.

Many thanx to the OTP team for this new release!

--
igwan





More information about the erlang-questions mailing list