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 30
|
<html>
<head><title>LD-ERROR-ACTION.html -- ACL2 Version 3.1</title></head>
<body text=#000000 bgcolor="#FFFFFF">
<h2>LD-ERROR-ACTION</h2>determines <code><a href="LD.html">ld</a></code>'s response to an error
<pre>Major Section: <a href="MISCELLANEOUS.html">MISCELLANEOUS</a>
</pre><p>
<code>Ld-error-action</code> is an <code><a href="LD.html">ld</a></code> special (see <a href="LD.html">ld</a>). The accessor is
<code>(ld-error-action state)</code> and the updater is
<code>(set-ld-error-action val state)</code>. <code>Ld-error-action</code> must be
<code>:continue</code>, <code>:return</code>, or <code>:error</code>. The initial value of
<code>ld-error-action</code> is <code>:continue</code>, which means that the top-level
ACL2 <a href="COMMAND.html">command</a> loop will not exit when an error is caused by
<code>user-typein</code>. But the default value for <code>ld-error-action</code> on
calls of <code><a href="LD.html">ld</a></code> is <code>:return</code>.
<p>
The general-purpose ACL2 read-eval-print loop, <code><a href="LD.html">ld</a></code>, reads forms from
<code><a href="STANDARD-OI.html">standard-oi</a></code>, evaluates them and prints the result to <code><a href="STANDARD-CO.html">standard-co</a></code>.
However, there are various flags that control <code><a href="LD.html">ld</a></code>'s behavior and
<code>ld-error-action</code> is one of them. If, while <code><a href="LD-ERROR-TRIPLES.html">ld-error-triples</a></code> is <code>t</code>, a
form evaluates to three results, the first of which is non-<code>nil</code> and
the third of which is <code><a href="STATE.html">state</a></code>, an error is said to have occurred. If
an error occurs, <code><a href="LD.html">ld</a></code>'s action depends on <code>ld-error-action</code>. If it is
<code>:continue</code>, <code><a href="LD.html">ld</a></code> just continues processing the forms in <code><a href="STANDARD-OI.html">standard-oi</a></code>.
If it is <code>:return</code>, <code><a href="LD.html">ld</a></code> stops and returns as though it had emptied the
channel. If it is <code>:error</code>, <code><a href="LD.html">ld</a></code> stops and returns, signalling an error
to its caller.
<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>
|