[erlang-questions] String versus variable in binary literal
Wed May 16 12:29:35 CEST 2012
On Wed, May 16, 2012 at 10:56 AM, Richard Carlsson
> 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.
It's a bug (or should be a bug) - try this for size:
Isn't that beautiful :-)
> erlang-questions mailing list
More information about the erlang-questions