<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ensure-char-integer</title><link rel="stylesheet" href="ecl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The ECL manual"><link rel="up" href="rn03.html" title="Objects"><link rel="prev" href="rn03re62.html" title="ensure-char-character"><link rel="next" href="rn03re64.html" title="make-null-pointer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><code class="function">ensure-char-integer</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="rn03re62.html">Prev</a> </td><th width="60%" align="center">Objects</th><td width="20%" align="right"> <a accesskey="n" href="rn03re64.html">Next</a></td></tr></table><hr></div><div class="refentry" title="ensure-char-integer"><a name="uffi.ensure-char-integer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p><code class="function">ensure-char-integer</code> — Ensures that a dereferenced <code class="constant">:char</code> pointer is an integer. </p></div><div class="refsynopsisdiv" title="Macro"><h2>Macro</h2><div class="funcsynopsis"><p><code class="funcdef">(ensure-char-integer</code> <var class="pdparam">object</var>)</p></div><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>object</code></em></span></p></td><td><p>Either a character or a integer specifying a character code.</p></td></tr><tr><td><p><span class="term">returns</span></p></td><td><p>An integer.</p></td></tr></tbody></table></div></div><div class="refsect1" title="Description"><a name="id2621290"></a><h2>Description</h2><p> Ensures that an object obtained by dereferencing a <code class="constant">:char</code> pointer is an integer.</p></div><div class="refsect1" title="Examples"><a name="id2621305"></a><h2>Examples</h2><p> </p><pre class="screen"> (let ((fs (convert-to-foreign-string "a"))) (prog1 (ensure-char-integer (deref-pointer fs :char)) (free-foreign-object fs))) => 96</pre></div><div class="refsect1" title="Side Effects"><a name="id2621322"></a><h2>Side Effects</h2><p>None.</p></div><div class="refsect1" title="Affected by"><a name="id2621332"></a><h2>Affected by</h2><p>None.</p></div><div class="refsect1" title="Exceptional Situations"><a name="id2621342"></a><h2>Exceptional Situations</h2><p>Depending upon the implementation and what <a class="link" href="pt04.html" title="Part IV. UFFI Reference"><span class="application">UFFI</span></a> expects, this macro may signal an error if the object is not a character or integer.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="rn03re62.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="rn03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="rn03re64.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><code class="function">ensure-char-character</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <code class="function">make-null-pointer</code></td></tr></table></div></body></html>