File 0892-Document-the-allowed-float-sizes-for-the-bit-syntax.patch of Package erlang

From 64a8423da79c022f52659067b1237a892f3a8a11 Mon Sep 17 00:00:00 2001
From: Richard Carlsson <richardc@klarna.com>
Date: Wed, 13 Nov 2019 11:19:56 +0100
Subject: [PATCH] Document the allowed float sizes for the bit syntax

The current implementation of the bit syntax only allows floating point
fields of size 64 or 32. Make this clear in the Erlang Reference Manual.
---
 system/doc/programming_examples/bit_syntax.xml | 3 ++-
 system/doc/reference_manual/expressions.xml    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/system/doc/programming_examples/bit_syntax.xml b/system/doc/programming_examples/bit_syntax.xml
index d1dd52c5ab..a64be0c007 100644
--- a/system/doc/programming_examples/bit_syntax.xml
+++ b/system/doc/programming_examples/bit_syntax.xml
@@ -285,7 +285,8 @@ X:4/little-signed-integer-unit:8</code>
     <p>Each segment in a binary can consist of zero or more bits.
        A segment of type <c>binary</c> must have a size evenly divisible by 8
     (or divisible by the unit size, if the unit size has been changed).
-    A segment of type <c>bitstring</c> has no restrictions on the size.</p>
+    A segment of type <c>bitstring</c> has no restrictions on the size.
+    A segment of type <c>float</c> must have size 64 or 32.</p>
     <p>As mentioned earlier, segments have the following general syntax:</p>
     <p><c>Value:Size/TypeSpecifierList</c></p>
     <p>When matching <c>Value</c>, value must be either a variable or
diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml
index ea3b2159fc..baa1269470 100644
--- a/system/doc/reference_manual/expressions.xml
+++ b/system/doc/reference_manual/expressions.xml
@@ -1153,7 +1153,8 @@ Ei = Value |
     </taglist>
     <p>The value of <c>Size</c> multiplied with the unit gives
       the number of bits. A segment of type <c>binary</c> must have 
-      a size that is evenly divisible by 8.</p>
+      a size that is evenly divisible by 8. For a segment of type <c>float</c>
+      the size must be either 64 or 32.</p>
 
     <note><p>When constructing binaries, if the size <c>N</c> of an integer
     segment is too small to contain the given integer, the most significant
-- 
2.16.4

openSUSE Build Service is sponsored by