| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html> |
| 3 |
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<title>array-in-bounds-p (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="array-in-bounds-p (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="array-in-bounds-p (ANSI and GNU Common Lisp Document)"> |
| 10 |
<meta name="resource-type" content="document"> |
| 11 |
<meta name="distribution" content="global"> |
| 12 |
<meta name="Generator" content="makeinfo"> |
| 13 |
<link href="index.html" rel="start" title="Top"> |
| 14 |
<link href="Arrays-Dictionary.html" rel="up" title="Arrays Dictionary"> |
| 15 |
<link href="array_002drank.html" rel="next" title="array-rank"> |
| 16 |
<link href="array_002ddisplacement.html" rel="prev" title="array-displacement"> |
| 17 |
<style type="text/css"> |
| 18 |
<!-- |
| 19 |
a.summary-letter {text-decoration: none} |
| 20 |
blockquote.indentedblock {margin-right: 0em} |
| 21 |
div.display {margin-left: 3.2em} |
| 22 |
div.example {margin-left: 3.2em} |
| 23 |
div.lisp {margin-left: 3.2em} |
| 24 |
kbd {font-style: oblique} |
| 25 |
pre.display {font-family: inherit} |
| 26 |
pre.format {font-family: inherit} |
| 27 |
pre.menu-comment {font-family: serif} |
| 28 |
pre.menu-preformatted {font-family: serif} |
| 29 |
span.nolinebreak {white-space: nowrap} |
| 30 |
span.roman {font-family: initial; font-weight: normal} |
| 31 |
span.sansserif {font-family: sans-serif; font-weight: normal} |
| 32 |
ul.no-bullet {list-style: none} |
| 33 |
--> |
| 34 |
</style> |
| 35 |
|
| 36 |
|
| 37 |
</head> |
| 38 |
|
| 39 |
<body lang="en"> |
| 40 |
<span id="array_002din_002dbounds_002dp"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Next: <a href="array_002drank.html" accesskey="n" rel="next">array-rank</a>, Previous: <a href="array_002ddisplacement.html" accesskey="p" rel="prev">array-displacement</a>, Up: <a href="Arrays-Dictionary.html" accesskey="u" rel="up">Arrays Dictionary</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="array_002din_002dbounds_002dp-_005bFunction_005d"></span><h4 class="subsection">15.2.16 array-in-bounds-p [Function]</h4> |
| 46 |
|
| 47 |
<p><code>array-in-bounds-p</code> <i>array <span class="roman">&rest</span> subscripts</i> ⇒ <i>generalized-boolean</i> |
| 48 |
</p> |
| 49 |
<span id="Arguments-and-Values_003a_003a-328"></span><h4 class="subsubheading">Arguments and Values::</h4> |
| 50 |
|
| 51 |
<p><i>array</i>—an <i>array</i>. |
| 52 |
</p> |
| 53 |
<p><i>subscripts</i>—a list of <i>integers</i> |
| 54 |
of length equal to the <i>rank</i> of the <i>array</i>. |
| 55 |
</p> |
| 56 |
<p><i>generalized-boolean</i>—a <i>generalized boolean</i>. |
| 57 |
</p> |
| 58 |
<span id="Description_003a_003a-435"></span><h4 class="subsubheading">Description::</h4> |
| 59 |
|
| 60 |
<p>Returns <i>true</i> if the <i>subscripts</i> are all in bounds for <i>array</i>; |
| 61 |
otherwise returns <i>false</i>. |
| 62 |
(If <i>array</i> is a <i>vector</i> with a <i>fill pointer</i>, |
| 63 |
that <i>fill pointer</i> is ignored.) |
| 64 |
</p> |
| 65 |
<span id="Examples_003a_003a-312"></span><h4 class="subsubheading">Examples::</h4> |
| 66 |
<div class="example"> |
| 67 |
<pre class="example"> (setq a (make-array '(7 11) :element-type 'string-char)) |
| 68 |
(array-in-bounds-p a 0 0) ⇒ <i>true</i> |
| 69 |
(array-in-bounds-p a 6 10) ⇒ <i>true</i> |
| 70 |
(array-in-bounds-p a 0 -1) ⇒ <i>false</i> |
| 71 |
(array-in-bounds-p a 0 11) ⇒ <i>false</i> |
| 72 |
(array-in-bounds-p a 7 0) ⇒ <i>false</i> |
| 73 |
</pre></div> |
| 74 |
|
| 75 |
<span id="See-Also_003a_003a-356"></span><h4 class="subsubheading">See Also::</h4> |
| 76 |
|
| 77 |
<p><a href="array_002ddimensions.html">array-dimensions</a> |
| 78 |
</p> |
| 79 |
<span id="Notes_003a_003a-236"></span><h4 class="subsubheading">Notes::</h4> |
| 80 |
<div class="example"> |
| 81 |
<pre class="example"> (array-in-bounds-p array subscripts) |
| 82 |
≡ (and (not (some #'minusp (list subscripts))) |
| 83 |
(every #'< (list subscripts) (array-dimensions array))) |
| 84 |
</pre></div> |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
</body> |
| 90 |
</html> |