summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-12 19:43:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-12 19:43:36 -0700
commit2f9728db321c67ee6c41372914a4a56a5809356d (patch)
tree748d7793e6bb6a0db24c497bbfa935a7e0038ba8 /txr.1
parentb99df52f66223dcfb5c935bf6ccbe2667cf36e08 (diff)
downloadtxr-2f9728db321c67ee6c41372914a4a56a5809356d.tar.gz
txr-2f9728db321c67ee6c41372914a4a56a5809356d.tar.bz2
txr-2f9728db321c67ee6c41372914a4a56a5809356d.zip
doc: document bracket notation for carray and buf.
* txr.1: Put carray and buf cases into the description of the indexing notation under the dwim operator.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.126
1 files changed, 25 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 530bdba0..08b9c0ce 100644
--- a/txr.1
+++ b/txr.1
@@ -13826,7 +13826,31 @@ If this form is used as a place, then the object must
support a
.code lambda-set
method.
-
+.meIP >> [ carray << index ]
+.meIP >> [ carray << from-index..to-below-index ]
+Element and range indexing is possible on object of type
+.code carray
+which manipulate arrays in a foreign ("C language") representation,
+and are closely associated with the Foreign Function Interface (FFI).
+Just like in the case of sequences, the semantics of referencing
+.code carray
+objects with the bracket notation is based on the functions
+.codn ref ,
+.codn refset ,
+.code sub
+and
+.codn replace .
+These, in turn, rely on the specialized functions.
+.codn carray-ref ,
+.codn carray-refset ,
+.code carray-sub
+and
+.codn carray-replace .
+.meIP >> [ buf << index ]
+Indexing is supported for objects of type
+.codn buf .
+This provides a way to access and store the individual bytes
+of a buffer.
.RE
.PP