summaryrefslogtreecommitdiff
path: root/doc/reference/html/readline-module.html
blob: c7194544ebfc064d6aee3eec9a42ae79363edf12 (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>readline: Seed Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Seed Reference Manual">
<link rel="up" href="modules.html" title="Part IV. Seed Module Reference">
<link rel="prev" href="modules.html" title="Part IV. Seed Module Reference">
<link rel="next" href="sqlite-module.html" title="SQLite">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="modules.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="modules.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="sqlite-module.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="readline-module"></a>readline</h2></div>
<div><div class="author">
<h3 class="author">
<span class="firstname">Robert</span> <span class="surname">Carr</span>
</h3>
<div class="affiliation"><div class="address"><p><br>
	  <code class="email">&lt;<a class="email" href="mailto:racarr@gnome.org">racarr@<em class="parameter"><code>gnome.org</code></em></a>&gt;</code><br>
	</p></div></div>
</div></div>
</div></div>
<div class="refsect1">
<a name="id-1.5.3.3"></a><h2>API Reference</h2>
<p>
      The readline module allows for basic usage of the GNU readline library, in Seed. More advanced features may be added a a later time. In order to use the readline module it must be first imported.
      </p>
<pre class="programlisting">
	readline = imports.readline;
      </pre>
<p>
    </p>
<span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span>
</div>
<div class="refsect1">
<a name="id-1.5.3.4"></a><h2>Examples</h2>
<p>Below are several examples of using the Seed readline module. For additional resources, consult the examples/ folder of the Seed source</p>
<div class="example">
<a name="readline-repl-example"></a><p class="title"><b>Example 14. </b></p>
<div class="example-contents">
<p>This demonstrates a simple REPL using the readline module</p>
<pre class="programlisting">
readline = imports.readline;
while (1){
  try{
    eval(readline.readline("&gt; "));
  }
  catch(e) {
    print(e.name + " " + e.message);
  }
}
      </pre>
</div>
</div>
<br class="example-break">
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>