gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 08/12: doc/bytevector-slices: Document slice-X-ref and s


From: gnunet
Subject: [gnunet-scheme] 08/12: doc/bytevector-slices: Document slice-X-ref and slice-X-set!.
Date: Mon, 12 Sep 2022 18:49:08 +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 298efcdf50bb60f572cab3e7e4a8f1569836581c
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Mon Sep 12 18:32:03 2022 +0200

    doc/bytevector-slices: Document slice-X-ref and slice-X-set!.
    
    * doc/bytevector-slice.tm (Reading / modifying bytevector slices):
    New section.
---
 doc/bytevector-slices.tm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/doc/bytevector-slices.tm b/doc/bytevector-slices.tm
index 27d8a4c..ff27d0a 100644
--- a/doc/bytevector-slices.tm
+++ b/doc/bytevector-slices.tm
@@ -136,6 +136,29 @@
     <hlink|IEEE<index|IEEE> 
binary64/double<index|binary64><index|double>|https://en.wikipedia.org/wiki/Double-precision_floating-point_format>
     format.
   </description>
+
+  Except for <scm|u8> and <scm|s8>, <scm|slice-X-ref> can be called as
+  <scm|(slice-X-ref slice <var|index> <var|endian>)>, where <var|slice> is
+  the bytevector slice, <var|index> is the byte index into the slice and
+  <var|endian> is the <dfn|endianness> according to which the bytes of the
+  type are ordered. Endianness is part of <scm|(rnrs bytevectors>). For
+  communication over the network (including communication between clients and
+  services), big-endian (i.e., <scm|(endianness big)>) is almost always used
+  in GNUnet.
+
+  Except for <scm|u8> and <scm|s8>, <scm|slice-X-set!> can be called as
+  <scm|(slice-X-ref slice <var|index> <var|endian> <var|value>)>, where
+  <var|slice>, <var|index> and <var|endian> have the same meaning as for
+  <scm|slice-X-ref>, and <var|value> is the value to set it to.
+
+  <todo|out-of-bounds, range and capabilities exceptions, can <var|value> be
+  a exact for <scm|ieee-double>>
+
+  For <scm|u8> and <scm|s8>, there is only a single byte and hence there is
+  no endianness. As such, <scm|slice-u8-ref>, <scm|slice-u8-set!>,
+  <scm|slice-s8-ref> and <scm|slice-s8-set!> do not have an endianness
+  argument. Aside from that, they behave similarly to the other
+  <scm|slice-X-ref> and <scm|slice-X-set!> procedures.
 </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]