[erlang-questions] String versus variable in binary literal
Wed May 16 10:56:33 CEST 2012
On 05/16/2012 10:49 AM, Michel Rijnders wrote:
> Confused newbie here. Can someone please explain the following:
> 1> <<"foo">>.
> 2> Foo = "foo".
> 3> <<Foo>>.
> ** exception error: bad argument
> What's the error in the last case?
The bit syntax doesn't (currently) support encoding strings that are not
constant literals. This is something that should be fixed, IMO.
More information about the erlang-questions