File 1024-erlang-module-doc-min-2-and-max-2.patch of Package erlang

From ebf1c0c27af197bab0897ec50680b620505eeb28 Mon Sep 17 00:00:00 2001
From: Kjell Winblad <kjellwinblad@gmail.com>
Date: Wed, 2 Sep 2020 09:53:05 +0200
Subject: [PATCH 14/39] erlang module doc: min/2 and max/2

* Define when terms are equal
* Link to expression section for description of how terms are ordered
* Add examples
---
 erts/doc/src/erlang.xml | 46 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 42 insertions(+), 4 deletions(-)

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 1095d92404..139e3f4bbe 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -3296,8 +3296,27 @@ false</code>
       <fsummary>Return the largest of two terms.</fsummary>
       <desc>
         <p>Returns the largest of <c><anno>Term1</anno></c> and
-          <c><anno>Term2</anno></c>.
-          If the terms are equal, <c><anno>Term1</anno></c> is returned.</p>
+        <c><anno>Term2</anno></c>. If the terms compare equal with
+        the <c>==</c> operator, <c><anno>Term1</anno></c> is
+        returned.</p>
+        <p>The
+        <seealso
+            marker="system/reference_manual:expressions#term-comparisons">
+          Expressions section</seealso> contains descriptions of the
+          <c>==</c> operator and how terms are ordered.</p>
+        <p>Examples:</p>
+        <pre>
+> <input>max(1, 2).</input>
+2</pre>
+          <pre>
+> <input>max(1.0, 1).</input>
+1.0</pre>
+          <pre>
+> <input>max(1, 1.0).</input>
+1</pre>
+          <pre>
+> <input>max("abc", "b").</input>
+"b"</pre>
       </desc>
     </func>
 
@@ -3538,8 +3557,27 @@ RealSystem = system + MissedSystem</code>
       <fsummary>Return the smallest of two terms.</fsummary>
       <desc>
         <p>Returns the smallest of <c><anno>Term1</anno></c> and
-          <c><anno>Term2</anno></c>.
-          If the terms are equal, <c><anno>Term1</anno></c> is returned.</p>
+          <c><anno>Term2</anno></c>. If the terms compare equal with
+        the <c>==</c> operator, <c><anno>Term1</anno></c> is
+        returned.</p>
+        <p>The
+        <seealso
+            marker="system/reference_manual:expressions#term-comparisons">
+          Expressions section</seealso> contains descriptions of the
+          <c>==</c> operator and how terms are ordered.</p>
+        <p>Examples:</p>
+        <pre>
+> <input>min(1, 2).</input>
+1</pre>
+          <pre>
+> <input>min(1.0, 1).</input>
+1.0</pre>
+          <pre>
+> <input>min(1, 1.0).</input>
+1</pre>
+          <pre>
+> <input>min("abc", "b").</input>
+"abc"</pre>
       </desc>
     </func>
 
-- 
2.26.2

openSUSE Build Service is sponsored by