天天看點

erlang 二進制中 拼接 變量或者函數 報錯

在qq群中咨詢得知:

Value:Size/TypeSpecifierList

The Value part is any expression, when used in binary construction. Used in binary matching, the Value part must be a literal or a variable

When constructing binaries, Value and Size can be any Erlang expression. However, for syntactical reasons, both Value and Size must be enclosed in parenthesis if the expression consists of anything more than a single literal or a variable

繼續閱讀