diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml index 79e76bc6afcd..453ca0bb8236 100644 --- a/system/doc/reference_manual/expressions.xml +++ b/system/doc/reference_manual/expressions.xml @@ -283,7 +283,9 @@ value 3> f(Key), #{Key := Value} = (#{key := Key} = M), Value. value 4> f(Key), (#{Key := Value} = #{key := Key}) = M, Value. -* 1:12: variable 'Key' is unbound +* 1:12: variable 'Key' is unbound +5> <<X:Y>> = begin Y = 8, <<42:8>> end, X. +42

The expression at prompt 2> first matches the value of variable M against pattern #{key := Key}, binding @@ -307,6 +309,13 @@ value sub patterns are matched at the same time, and the variable Key is therefore not bound when matching against pattern #{Key := Value}.

+ +

In the expression at prompt 5> the expressions + inside the block + expression are evaluated first, binding variable + Y and creating a binary. The binary is then matched + against pattern <<X:Y>> using the value of + Y as the size of the segment.

@@ -1767,6 +1776,7 @@ end
+ Block Expressions
 begin