Debian Codegraph @

docsrc/xlisp/xlisp-doc/reference/global-breakenable.htm

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