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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
<html><head><title>XLISP *breakenable*</title>
<link rel="stylesheet" type="text/css" href="reference.css">
</head>
<body>
<a href="../start.htm">Nyquist / XLISP 2.0</a> -
<a href="../manual/contents.htm">Contents</a> |
<a href="../tutorials/tutorials.htm">Tutorials</a> |
<a href="../examples/examples.htm">Examples</a> |
<a href="reference-index.htm">Reference</a>
<hr>
<h1>*breakenable*</h1>
<hr>
<p><table cellpadding="0" cellspacing="0" style="margin-left:10px"><tbody>
<tr valign="top">
<td><nobr>Type:</nobr></td>
<td><nobr> - </nobr></td>
<td width="100%"><nobr>system variable</nobr></td>
</tr>
<tr valign="top">
<td><nobr>Source:</nobr></td>
<td><nobr> - </nobr></td>
<td width="100%"><nobr>xldbug.c</nobr></td>
</tr>
</tbody></table></p>
<h2>Syntax</h2>
<p><div class="box">
<dl>
<dt>(<a href="setq.htm">setq</a> <b>*breakenable*</b> <i>boolean</i>)</dt>
<dd><i>boolean</i> - a generalized boolean value<br>
returns - <nobr>non-<a href="nil.htm">NIL</a></nobr> if errors shall be handled by the
<nobr><a href="../manual/xlisp.htm#break-loop">Break Loop</a></nobr>, or <a href="nil.htm">NIL</a> if not</dd>
</dl>
</div></p>
<h2>Description</h2>
<p>The *breakenable* system variable controls entry to the
<nobr><a href="../manual/xlisp.htm#break-loop">Break Loop</a></nobr> and
the trapping of errors. <nobr>If *breakenable*</nobr> is set to
<nobr><a href="nil.htm">NIL</a> ,</nobr> then no errors from the
system or from the <a href="error.htm">error</a> or
<a href="cerror.htm">cerror</a> functions will be trapped.
<nobr>If *breakenable*</nobr> is <nobr>non-<a href="nil.htm">NIL</a></nobr>,
the <nobr><a href="../manual/xlisp.htm#break-loop">Break Loop</a></nobr>
will handle these errors. <nobr>The <a href="break.htm">break</a></nobr>
function is not affected by *breakenable* and will always force entry to the
<nobr><a href="../manual/xlisp.htm#break-loop">Break Loop</a></nobr>.
<nobr>If the</nobr> '<nobr>init.lsp</nobr>' initialization file sets
*breakenable* to <nobr><a href="t.htm"> T </a></nobr>,
errors will be trapped by the
<nobr><a href="../manual/xlisp.htm#break-loop">Break Loop</a></nobr>.</p>
<h2>Examples</h2>
<pre class="example">
> (defun foo (x) <font color="#008844">; define function FOO</font>
(+ x x))
FOO
> (setq *breakenable* NIL) <font color="#008844">; disable break loop</font>
NIL
> (foo "a")
error: bad argument type <font color="#008844">; does NOT enter a break loop</font>
> (setq *breakenable* T) <font color="#008844">; enable break loop</font>
T
> (foo "a")
error: bad argument type
1> <font color="#008844">; entered a break loop</font>
</pre>
<p>See also:</p>
<ul>
<li><nobr>Contents → <a href="../manual/contents.htm#symbols">Symbols</a></nobr></li>
<li><nobr>Contents → <a href="../manual/contents.htm#debugging-and-error-handling">Debugging and Error Handling</a></nobr></li>
<li><nobr>XLISP 2.0 Manual → <a href="../manual/xlisp.htm#break-loop">Break Loop</a></nobr></li>
<li><nobr>Tutorials → Nyquist → <a href="../tutorials/nyquist.htm#debugger-shortcuts">Debugger Shortcuts</a></nobr></li>
</ul>
<p><nobr> <a href="#top">Back to Top</nobr></a></p>
<hr>
<a href="../start.htm">Nyquist / XLISP 2.0</a> -
<a href="../manual/contents.htm">Contents</a> |
<a href="../tutorials/tutorials.htm">Tutorials</a> |
<a href="../examples/examples.htm">Examples</a> |
<a href="reference-index.htm">Reference</a>
</body></html>
|