diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2022-12-16 04:07:03 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2022-12-16 07:26:26 +0100 |
commit | 5da4b90d861e75bf913b420bd810f5ce3c1c0cbc (patch) | |
tree | 6d92a8be611679e454cdb77e32957ff45ec3bedc /system/doc | |
parent | b454635d4be8b4bdaf3bdf52b343769a71042f07 (diff) | |
download | erlang-5da4b90d861e75bf913b420bd810f5ce3c1c0cbc.tar.gz |
Allow max/2 and min/2 to be used in guards
Closes #6544
Diffstat (limited to 'system/doc')
-rw-r--r-- | system/doc/reference_manual/expressions.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml index 341fa32432..3ad0616dd2 100644 --- a/system/doc/reference_manual/expressions.xml +++ b/system/doc/reference_manual/expressions.xml @@ -2023,6 +2023,12 @@ end</pre> <cell align="left" valign="middle"><c>map_size(Map)</c></cell> </row> <row> + <cell align="left" valign="middle"><c>max(A, B)</c></cell> + </row> + <row> + <cell align="left" valign="middle"><c>min(A, B)</c></cell> + </row> + <row> <cell align="left" valign="middle"><c>node()</c></cell> </row> <row> @@ -2049,6 +2055,9 @@ end</pre> <tcaption>Other BIFs Allowed in Guard Expressions</tcaption> </table> + <change><p>The <c>min/2</c> and <c>max/2</c> BIFs are allowed to be + used in guards from Erlang/OTP 26.</p></change> + <p>If an arithmetic expression, a Boolean expression, a short-circuit expression, or a call to a guard BIF fails (because of invalid arguments), the entire guard fails. If the guard was |