diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/elisp/array-functions.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/elisp/array-functions.html')
| -rw-r--r-- | devdocs/elisp/array-functions.html | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/devdocs/elisp/array-functions.html b/devdocs/elisp/array-functions.html deleted file mode 100644 index d0cf3231..00000000 --- a/devdocs/elisp/array-functions.html +++ /dev/null @@ -1,64 +0,0 @@ - <h3 class="section">Functions that Operate on Arrays</h3> <p>In this section, we describe the functions that accept all types of arrays. </p> <dl> <dt id="arrayp">Function: <strong>arrayp</strong> <em>object</em> -</dt> <dd> -<p>This function returns <code>t</code> if <var>object</var> is an array (i.e., a vector, a string, a bool-vector or a char-table). </p> <div class="example"> <pre class="example">(arrayp [a]) - ⇒ t -(arrayp "asdf") - ⇒ t -(arrayp (syntax-table)) ;; <span class="roman">A char-table.</span> - ⇒ t -</pre> -</div> </dd> -</dl> <dl> <dt id="aref">Function: <strong>aref</strong> <em>arr index</em> -</dt> <dd> - <p>This function returns the <var>index</var>th element of the array or record <var>arr</var>. The first element is at index zero. </p> <div class="example"> <pre class="example">(setq primes [2 3 5 7 11 13]) - ⇒ [2 3 5 7 11 13] -(aref primes 4) - ⇒ 11 -</pre> -<pre class="example">(aref "abcdefg" 1) - ⇒ 98 ; <span class="roman">‘<samp>b</samp>’ is <acronym>ASCII</acronym> code 98.</span> -</pre> -</div> <p>See also the function <code>elt</code>, in <a href="sequence-functions">Sequence Functions</a>. </p> -</dd> -</dl> <dl> <dt id="aset">Function: <strong>aset</strong> <em>array index object</em> -</dt> <dd> -<p>This function sets the <var>index</var>th element of <var>array</var> to be <var>object</var>. It returns <var>object</var>. </p> <div class="example"> <pre class="example">(setq w (vector 'foo 'bar 'baz)) - ⇒ [foo bar baz] -(aset w 0 'fu) - ⇒ fu -w - ⇒ [fu bar baz] -</pre> - -<pre class="example">;; <span class="roman"><code>copy-sequence</code> copies the string to be modified later.</span> -(setq x (copy-sequence "asdfasfd")) - ⇒ "asdfasfd" -(aset x 3 ?Z) - ⇒ 90 -x - ⇒ "asdZasfd" -</pre> -</div> <p>The <var>array</var> should be mutable. See <a href="mutability">Mutability</a>. </p> <p>If <var>array</var> is a string and <var>object</var> is not a character, a <code>wrong-type-argument</code> error results. The function converts a unibyte string to multibyte if necessary to insert a character. </p> -</dd> -</dl> <dl> <dt id="fillarray">Function: <strong>fillarray</strong> <em>array object</em> -</dt> <dd> -<p>This function fills the array <var>array</var> with <var>object</var>, so that each element of <var>array</var> is <var>object</var>. It returns <var>array</var>. </p> <div class="example"> <pre class="example">(setq a (copy-sequence [a b c d e f g])) - ⇒ [a b c d e f g] -(fillarray a 0) - ⇒ [0 0 0 0 0 0 0] -a - ⇒ [0 0 0 0 0 0 0] -</pre> -<pre class="example">(setq s (copy-sequence "When in the course")) - ⇒ "When in the course" -(fillarray s ?-) - ⇒ "------------------" -</pre> -</div> <p>If <var>array</var> is a string and <var>object</var> is not a character, a <code>wrong-type-argument</code> error results. </p> -</dd> -</dl> <p>The general sequence functions <code>copy-sequence</code> and <code>length</code> are often useful for objects known to be arrays. See <a href="sequence-functions">Sequence Functions</a>. </p><div class="_attribution"> - <p class="_attribution-p"> - Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br> - <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Array-Functions.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Array-Functions.html</a> - </p> -</div> |
