1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<html>
<head><title>AREF2.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h3>AREF2</h3>access the elements of a 2-dimensional array
<pre>Major Section: <a href="ARRAYS.html">ARRAYS</a>
</pre><p>
<pre>
Example Form:
(aref2 'delta1 a i j)
<p>
General Form:
(aref2 name alist i j)
</pre>
where <code>name</code> is a symbol, <code>alist</code> is a 2-dimensional array and <code>i</code> and <code>j</code>
are legal indices into <code>alist</code>. This function returns the value
associated with <code>(i . j)</code> in <code>alist</code>, or else the default value of the
array. See <a href="ARRAYS.html">arrays</a> for details.<p>
This function executes in virtually constant time if <code>alist</code> is in
fact the ``semantic value'' associated with <code>name</code> (see <a href="ARRAYS.html">arrays</a>).
When it is not, <code>aref2</code> must do a linear search through <code>alist</code>. In
that case the correct answer is returned but a <strong>slow array</strong> comment is
printed to the comment window. See <a href="SLOW-ARRAY-WARNING.html">slow-array-warning</a>.
<br><br><br><a href="acl2-doc.html"><img src="llogo.gif"></a> <a href="acl2-doc-index.html"><img src="index.gif"></a>
</body>
</html>
|