gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] 07/12: doc/bytevector-slices: Document types supported b


From: gnunet
Subject: [gnunet-scheme] 07/12: doc/bytevector-slices: Document types supported by bytevector slices.
Date: Mon, 12 Sep 2022 18:49:07 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a commit to branch master
in repository gnunet-scheme.

commit 85da55d4e511ae3b6c5e907127be866744192046
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Mon Sep 12 18:13:23 2022 +0200

    doc/bytevector-slices: Document types supported by bytevector slices.
    
    * doc/bytevector-slice.tm (Reading / modifying bytevector slices):
    New section.
---
 doc/bytevector-slices.tm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/doc/bytevector-slices.tm b/doc/bytevector-slices.tm
index a5d620c..27d8a4c 100644
--- a/doc/bytevector-slices.tm
+++ b/doc/bytevector-slices.tm
@@ -110,6 +110,32 @@
     <scm|(slice-writable? <var|slice>)>
   </explain|Return <scm|#true> if the slice <var|slice> is writable,
   <scm|#false> otherwise.>
+
+  <section|Reading / modifying bytevector slices>
+
+  To read the value at a (byte) index in the slice, the procedures
+  <scm|slice-X-ref><index|slice-X-ref> are used. Likewise, to set the value
+  at a certain byte index, the procedures
+  <scm|slice-X-set!><index|slice-X-set!> are used. <scm|X> must be one of the
+  following:
+
+  <\description>
+    <item*|<scm|u8><index|u8>, u16<index|u16>, u32<index|u32>,
+    u64<index|u64>>An unsigned 8-bit, 16-bit, 32-bit and 64-bit integer,
+    respectively. I.e., an (exact) integer in the (closed) range
+    <math|<around*|[|0,2<rsup|N>-1|]>>, where <math|N> is the number of bits.
+
+    <item*|s8<index|s8>, s16<index|s16>, s32<index|s32>, s64<index|s64>>A
+    signed 8-bit, 16-bit, 32-bit and 64-bit integer, respectively, encoded in
+    the <hlink|two's 
complement|https://en.wikipedia.org/wiki/Two%27s_complement>
+    representation. I.e., an (exact) integer in the (closed) range
+    <math|<around*|[|-2<rsup|N-1>,2<rsup|N-1>-1|]>>.
+
+    <item*|<scm|ieee-double><index|ieee-double>>A <hlink|floating-point
+    number|https://en.wikipedia.org/wiki/Floating-point>, in
+    <hlink|IEEE<index|IEEE> 
binary64/double<index|binary64><index|double>|https://en.wikipedia.org/wiki/Double-precision_floating-point_format>
+    format.
+  </description>
 </body>
 
 <\initial>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]