<<binary, syntax>>, I'm real confused

69 views
Skip to first unread message

Elliot Crosby-McCullough

unread,
May 20, 2016, 6:10:13 AM5/20/16
to elixir-lang-talk
Hi all,

I've been doing a bunch of binary creation and parsing in Elixir recently and I'm having trouble pinning down its behaviour.  I've two main problems:
  1. I can't seem to find a properly comprehensive doc for Elixir's binary syntax.  All the googles point to the same couple of elixir guides which only provide an overview.
  2. Forming new binaries using the << >> syntax sometimes triggers `** (ArgumentError) argument error` with no other information as to which part is at fault or why.  I've not been able to precisely figure out what causes this class of errors, though it's often (but not always) when I use variables or nested << >> syntax to build binaries.
Can anyone point me at some docs where I can figure this all out?

Regards,
Elliot

Martin Svalin

unread,
May 20, 2016, 6:14:49 AM5/20/16
to elixir-lang-talk
I think the best docs on <<>> is in Kernel.SpecialForms

http://elixir-lang.org/docs/stable/elixir/Kernel.SpecialForms.html#%3C%3C%3E%3E/1

- Martin
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/1a7b991c-2bd3-46c0-a86f-c62d6cca8da8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Elliot Crosby-McCullough

unread,
May 20, 2016, 6:23:16 AM5/20/16
to elixir-l...@googlegroups.com
Ahh, perfect.  I'd skipped over that thinking it was about web forms, which in retrospect makes no sense at all.

--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-talk/vKT_hhLWZ0k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAAHw6CJW2cuNomGprDpyiRBPo9u3QknjDpvc%2B64hX2tmi7n%3DpQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages