stklos-ref-10.html 13.2 KB
Newer Older
eg's avatar
eg committed
1 2 3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
Erick's avatar
Erick committed
4
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
eg's avatar
eg committed
5 6 7 8 9 10 11 12 13
 <style type="text/css">
  <!--
  tt { font-family: monospace }
  code { font-family: monospace }
  -->
 </style>
<link href="doc-style.css" rel="stylesheet" type="text/css">
</head>
<body >
Erick's avatar
Erick committed
14 15
<table width='100%' cellpadding='0' cellspacing='0'><tr><td bgcolor="#8A8983"><font color="#FAFAFA"><center><h1>STklos Reference Manual<hr align="center" width="10%">10. Customizations</h1></center></font></table><table cellpadding="3" cellspacing="0" width="100%"><tr>
<td align="left" valign="top" width="20%" bgcolor="#8A8983">
eg's avatar
eg committed
16
<br /><table width="97%" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse;" frame="box" rules="none"><tbody>
Erick's avatar
Erick committed
17
<tr><th align="center" colspan="2" bgcolor="#ACE919"><font color="darkolivegreen">Contents</font></th></tr>
Erick's avatar
Erick committed
18
<tr class="navnorm"><td align="center"></td><td align="left"><a href="stklos-ref.html#-document-46527">*Top*</a></td></tr>
eg's avatar
eg committed
19 20 21 22 23 24 25 26
<tr class="navnorm"><td width="8%" align="left" valign="top">1&nbsp;</td><td align="left"><a href="stklos-ref-1.html#Introduction">Introduction</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">2&nbsp;</td><td align="left"><a href="stklos-ref-2.html#Expressions">Expressions</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">3&nbsp;</td><td align="left"><a href="stklos-ref-3.html#Program-structure">Program structure</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">4&nbsp;</td><td align="left"><a href="stklos-ref-4.html#Standard-Procedures">Standard Procedures</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">5&nbsp;</td><td align="left"><a href="stklos-ref-5.html#Regular-Expressions">Regular Expressions</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">6&nbsp;</td><td align="left"><a href="stklos-ref-6.html#Pattern-Matching">Pattern Matching</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">7&nbsp;</td><td align="left"><a href="stklos-ref-7.html#Exceptions-and-Conditions">Exceptions and Conditions</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">8&nbsp;</td><td align="left"><a href="stklos-ref-8.html#STklos-Object-System">STklos Object System</a></td></tr>
27 28
<tr class="navnorm"><td width="8%" align="left" valign="top">9&nbsp;</td><td align="left"><a href="stklos-ref-9.html#Threads--Mutexes-and-Condition-Variables">Threads, Mutexes and Condition Variables</a></td></tr>
<tr class="navsel"><td width="8%" align="left" valign="top">10&nbsp;</td><td align="left"><a href="stklos-ref-10.html#Customizations">Customizations</a><br /></td></tr>
Erick Gallesio's avatar
Erick Gallesio committed
29
<tr class="navnorm"><td width="8%" align="left" valign="top">11&nbsp;</td><td align="left"><a href="stklos-ref-11.html#The-ScmPkg-Package-System">The ScmPkg Package System</a></td></tr>
30 31 32 33 34
<tr class="navnorm"><td width="8%" align="left" valign="top">12&nbsp;</td><td align="left"><a href="stklos-ref-12.html#Foreign-Function-Interface">Foreign Function Interface</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">13&nbsp;</td><td align="left"><a href="stklos-ref-13.html#Using-the-SLIB-package">Using the SLIB package</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">14&nbsp;</td><td align="left"><a href="stklos-ref-14.html#SRFIs">SRFIs</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">15&nbsp;</td><td align="left"><a href="stklos-ref-15.html#Index">Index</a></td></tr>
<tr class="navnorm"><td width="8%" align="left" valign="top">&nbsp;</td><td align="left"><a href="stklos-ref-16.html#Bibliography">Bibliography</a></td></tr>
eg's avatar
eg committed
35 36 37
</tbody></table>
</td>
<td align="left" valign="top">
38 39 40
<p><span style="font-variant: small-caps">STklos</span> environement can be customized using
<a href="stklos-ref-4.html#Parameter-Objects">parameters objects</a>. These
parmaters are listed below.</p><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
41
<tr><td bgcolor="#dddddd"><a name="real-precision"></a><a name="--index-entry-43774"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
42 43
<tr><td align="left"><code><strong><font color="IndianRed">(real-precision)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
Erick's avatar
Erick committed
44 45
<code><strong><font color="IndianRed">(real-precision value)</font></strong></code><br /><br />This parameter object permits to change the default precision used
to print real numbers.
46
<blockquote><table cellspacing="0" class="code" cellpadding="4" width="90%"><tbody>
Erick's avatar
Erick committed
47
<tr><td bgcolor="ivory"><pre>(real-precision)        &#8658; 15
48 49 50 51 52 53 54 55
(<font color="#6959cf"><strong>define</strong></font> f 0.123456789)
(display f)             -| 0.123456789
(real-precision 3)
(display f)             -| 0.123
</pre></td></tr>
</tbody></table></blockquote>
</td></tr>
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
56
<tr><td bgcolor="#dddddd"><a name="read-case-sensitive"></a><a name="--index-entry-43825"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
57 58
<tr><td align="left"><code><strong><font color="IndianRed">(read-case-sensitive)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
Erick's avatar
Erick committed
59 60 61 62
<code><strong><font color="IndianRed">(read-case-sensitive value)</font></strong></code><br /><br />This parameter object permits to change the default behaviour of
the <code>read</code> primitive when reading a symbol. If this parameter has a
a true value a symbol is not converted to a default case when interned.
Since <span style="font-variant: small-caps">R<sup>5</sup>RS</span> requires that symbol are case insignificant, the default
63
value  of this parameter is <code>#f</code>.
64
<blockquote><table cellspacing="0" class="code" cellpadding="4" width="90%"><tbody>
Erick's avatar
Erick committed
65
<tr><td bgcolor="ivory"><pre>(read-case-sensitive)        &#8658; <code>#f</code>
66 67
(<font color="#6959cf"><strong>define</strong></font> x 'Symbol)
(display x)             -| symbol
Erick's avatar
Erick committed
68
(read-case-sensitive #t)
69 70
(<font color="#6959cf"><strong>define</strong></font> y 'Symbol)
(display y)             -| Symbol
eg's avatar
eg committed
71 72
</pre></td></tr>
</tbody></table></blockquote>
73

Erick's avatar
Erick committed
74
<strong>Note:</strong>  Default behaviour can be changed for a whole execution
75 76 77 78 79
with the <code>--case-sensitive</code> option.
<br /><br />
<strong>Note:</strong> See also syntax for <a href="stklos-ref-4.html#bar-in-symbol">special characters</a> in symbols.
</td></tr>
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
80
<tr><td bgcolor="#dddddd"><a name="write-pretty-quotes"></a><a name="--index-entry-43921"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
81 82
<tr><td align="left"><code><strong><font color="IndianRed">(write-pretty-quotes)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
Erick's avatar
Erick committed
83 84 85 86
<code><strong><font color="IndianRed">(write-pretty-quotes value)</font></strong></code><br /><br />This parameter object permits to change the default behaviour of
the <code>display</code> or <code>write</code> primitives when they write a list which starts with
 the symbol quote,  quasiquote, unquote or unquote-splicing. If this parameter
has a false value, the writer uses the list notation instead of a
87 88 89
more human-readable value.
By default, this parameter value is set to <code>#t</code>.
<blockquote><table cellspacing="0" class="code" cellpadding="4" width="90%"><tbody>
Erick's avatar
Erick committed
90
<tr><td bgcolor="ivory"><pre>(<strong>let</strong> ((x ''a))
91 92 93 94 95 96 97 98
  (display x)
  (display <font color="red">&quot; &quot;</font>)
  (write-pretty-quotes #f)
  (display x))               -| 'a (<strong>quote</strong> a)
</pre></td></tr>
</tbody></table></blockquote>
</td></tr>
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
99
<tr><td bgcolor="#dddddd"><a name="load-path"></a><a name="--index-entry-43979"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
100 101
<tr><td align="left"><code><strong><font color="IndianRed">(load-path)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
Erick's avatar
Erick committed
102 103 104
<code><strong><font color="IndianRed">(load-path value)</font></strong></code><br /><br /><code>load-path</code> is a parameter object. It
returns the current load path. The load path is a list of strings
which correspond to the directories in which a file must be searched for
105
loading. Directories of the load path are <em>prepended</em> (in
Erick's avatar
Erick committed
106 107
their apparition
order) to the file name given to <code>load</code> or <code>try-load</code> until the file
108 109
can be loaded.
<br /><br />
Erick's avatar
Erick committed
110
The initial value of the current load path can be set from the shell, by
111 112 113 114 115
setting the <code>STKLOS_LOAD_PATH</code> shell variable.
<br /><br />
Giving a <code>value</code> to the parameter <code>load-path</code> permits to change the
current list of paths.</td></tr>
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
116
<tr><td bgcolor="#dddddd"><a name="load-suffixes"></a><a name="--index-entry-44044"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
117 118 119 120
<tr><td align="left"><code><strong><font color="IndianRed">(load-suffixes)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
<code><strong><font color="IndianRed">(load-suffixes value)</font></strong></code><br /><br /><code>load-suffixes</code> is a parameter object. It
returns the list of possible suffixes for a Scheme file. Each suffix,
Erick's avatar
Erick committed
121 122 123
must be a string. Suffixes are appended (in their apparition order)
to a file name  is appended to a file name given to <code>load</code> or <code>try-load</code>
until the file can be loaded.</td></tr>
124
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
125
<tr><td bgcolor="#dddddd"><a name="load-verbose"></a><a name="--index-entry-44082"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
126 127 128
<tr><td align="left"><code><strong><font color="IndianRed">(load-verbose)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
<code><strong><font color="IndianRed">(load-verbose value)</font></strong></code><br /><br /><code>load-verbose</code> is a parameter object. It permits to display the
129
path name of the files which are loaded by <code>load</code> or <code>try-load</code> on
130 131
the current error port, when set to a true value. If <code>load-verbose</code>
is set to <code>#f</code>, no message is printed.</td></tr>
132
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
133
<tr><td bgcolor="#dddddd"><a name="thread-handler-error-show"></a><a name="--index-entry-44130"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
134 135 136 137 138 139 140 141 142 143
<tr><td align="left"><code><strong><font color="IndianRed">(thread-handler-error-show)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
<code><strong><font color="IndianRed">(thread-handler-error-show value)</font></strong></code><br /><br />When an untrapped error occurs in a thread, it produces an
<a href="stklos-ref-9.html#make-thread">uncaught exception</a> which can finally be
trapped when the thread is <a href="stklos-ref-9.html#thread-join-">joined</a>.
Setting the <code>thread-handler-error-show</code> parameter permits to see
error message as soon as possible, even without joining the thread.
This makes debugging easier. By default, this parameter is set to
<code>#t</code>.</td></tr>
</tbody></table><br /><table cellspacing="0" cellpadding="0" width="100%"><tbody>
Erick's avatar
Erick committed
144
<tr><td bgcolor="#dddddd"><a name="stklos-debug-level"></a><a name="--index-entry-44171"></a><table width="100%" style="border-collapse: collapse;" frame="void" rules="none"><tbody>
145 146 147 148 149 150
<tr><td align="left"><code><strong><font color="IndianRed">(stklos-debug-level)</font></strong></code></td><td align="right"><font color="darkolivegreen"><i><span style="font-variant: small-caps">STklos</span> procedure</i></font></td></tr>
</tbody></table>
<br /><code>stklos-debug-level</code> is a parameter objet. It permits to know the current
debugging level. The default value of this parameter is 0 (meaning &quot;no debug&quot;).
Note that the debugging level can also be set by the <code>--debug</code> option of the
<code>stklos(1)</code> command.</td></tr>
151
</tbody></table></td>
eg's avatar
eg committed
152
</tr></table><small><hr>This <span style="font-variant: small-caps">Html</span> page has been produced by 
Erick's avatar
Erick committed
153
                                     <a href="http://www.stklos.net/~eg/Publis/JFP05/article.html">Skribe</a>.<br />Last update <em>Fri Aug 24 16:33:14 2018</em></small>
eg's avatar
eg committed
154 155
</body>
</html>