diff --git a/src/doc/doc/about/expressions.xml b/src/doc/doc/about/expressions.xml index 5d0b21ec1..af7ae589f 100644 --- a/src/doc/doc/about/expressions.xml +++ b/src/doc/doc/about/expressions.xml @@ -79,11 +79,12 @@ Box.new(-10, 0, 90, 60).width The "nil" value shortcuts numerical expressions the following way:

-
-nil + x    -> nil
-x + nil    -> x
-nil + nil  -> nil
-
+ + + + + +
ExpressionResult
nil + xnil
x + nilx
nil + nilnil

The same applies to the other binary operators "*", "/", "-", "&" "|", "<< and ">>". @@ -97,16 +98,17 @@ nil + nil -> nil The logical binary operators "||" and "&&" behave this way:

-
-x || y      -> x if x is not "nil" or "false", y otherwise
-x || nil    -> x
-nil || x    -> x
-nil || nil  -> nil
-x && y      -> y if x is not "nil" or "false", x otherwise
-x && nil    -> nil
-nil && x    -> nil
-nil && nil  -> nil
-
+ + + + + + + + + + +
ExpressionResult
x || yx if x is not "nil" or "false", y otherwise
x || nilx
nil || xx
nil || nilnil
x && yy if x is not "nil" or "false", x otherwise
x && nilnil
nil && xnil
nil && nilnil

Constants