summaryrefslogtreecommitdiff
path: root/docsrc/xlisp/xlisp-doc/reference/read-int.htm
diff options
context:
space:
mode:
Diffstat (limited to 'docsrc/xlisp/xlisp-doc/reference/read-int.htm')
-rw-r--r--docsrc/xlisp/xlisp-doc/reference/read-int.htm78
1 files changed, 78 insertions, 0 deletions
diff --git a/docsrc/xlisp/xlisp-doc/reference/read-int.htm b/docsrc/xlisp/xlisp-doc/reference/read-int.htm
new file mode 100644
index 0000000..15aa9d5
--- /dev/null
+++ b/docsrc/xlisp/xlisp-doc/reference/read-int.htm
@@ -0,0 +1,78 @@
+<html><head><title>XLISP read-int</title>
+
+<link rel="stylesheet" type="text/css" href="reference.css">
+
+</head>
+
+<body>
+
+<a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
+<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>read-int</h1>
+
+<hr>
+
+<p><table cellpadding="0" cellspacing="0" style="margin-left:10px"><tbody>
+<tr valign="top">
+ <td><nobr>Type:</nobr></td>
+ <td><nobr>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
+ <td width="100%"><nobr>function (subr)</nobr></td>
+</tr>
+<tr valign="top">
+ <td><nobr>Source:</nobr></td>
+ <td><nobr>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
+ <td width="100%"><nobr>xlfio.c</nobr></td>
+</tr>
+</tbody></table></p>
+
+<h2>Syntax</h2>
+
+<dl>
+<dt>(<b>read-int</b> [<i>stream</i> [<i>length</i>]])</dt>
+<dd><i>stream</i> - the input stream [default is standard input]<br>
+<i>length</i> - the length of the integer in bytes [default is 4]<br>
+returns - the integer</dd>
+</dl>
+
+<h2>Description</h2>
+
+<p>The '<nobr>read-int</nobr>' function reads an integer from a binary input
+stream, created by the
+<nobr><a href="open-binary.htm">open-binary</a></nobr> function.</p>
+
+<p><b>Note:</b> Integers and floats are assumed to be
+<nobr>big-endian</nobr> [<nobr>high-order</nobr> byte first] and signed,
+regardless of the platform. <nobr>To read</nobr> <nobr>little-endian</nobr>
+format, use a negative number for the length, e.g. '-4' indicates a
+<nobr>4-bytes</nobr>, <nobr>low-order</nobr> byte first. The file should be
+opened in binary mode.</p>
+
+<h2>Examples</h2>
+
+<pre class="example">
+
+</pre>
+
+<p>See also <nobr><a href="write-int.htm">write-int</a></nobr>,
+<nobr><a href="read-float.htm">read-float</a></nobr>,
+<nobr><a href="write-float.htm">write-float</a></nobr>,
+<nobr><a href="bigendianp.htm">bigendianp</a></nobr>,
+<nobr><a href="open-binary.htm">open-binary</a></nobr>.</p>
+
+<p><nobr>&nbsp;&nbsp;<a href="#top">Back to Top</nobr></a></p>
+
+<hr>
+
+<a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
+<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> \ No newline at end of file