<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 21, 2008, at 8:49 AM, Andrew Shalit wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Keith -- I'm glad to hear that your port is going well. I'm taking the liberty of forwarding your message to the OpenMCL-Devel e-mail list, where it has more of a chance of being answered.<div><br></div><div>Andrew<br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">"Keith L. Downing" <<a href="mailto:Keith.Downing@idi.ntnu.no">Keith.Downing@idi.ntnu.no</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">April 20, 2008 4:58:21 PM EDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Discussion list for MCL users <<a href="mailto:info-mcl@clozure.com">info-mcl@clozure.com</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>[info-mcl] Making C arrays in OpenMCL</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Reply-To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Discussion list for MCL users <<a href="mailto:info-mcl@clozure.com">info-mcl@clozure.com</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Times; font-size: 16px; "><pre class="example">As part of my graphics conversion from MCL to OpenMCL (which is actually going quite well), I'm trying to</pre><pre class="example">use a variety of line types: solid, dash, dash-dot, etc. I declare each type as a CL global variable, which</pre><pre class="example">then points to an object that houses, among other things, a pointer to a small C array that codes the</pre><pre class="example">specification for the line type (as described in the "COCOA Drawing Guide" (pg. 75)). It's the pointer to</pre><pre class="example">this array that then gets passed to Objective C for drawing the line (as part of a Bezier curve).</pre><pre class="example"><br class="webkit-block-placeholder"></pre><pre class="example">However, I'm having trouble creating these arrays in Objective C via the foreign-function interface. My impression</pre><pre class="example">is that make-heap-ivector will do this for me, and it does seem to work when the element-type argument</pre><pre class="example">is '(unsigned-byte 64), for example. But it doesn't seem to work when I use '(double-float 64).</pre></span></div></blockquote></div></div></div></blockquote><div><br></div><div>That's because there's no such type as (double-float 64). Try this:</div><div><br></div><div><div>Welcome to Clozure Common Lisp Version 1.2-r9233M-RC1 (DarwinX8664)!</div><div>? (make-heap-ivector 10 'single-float)</div><div>#(0.0 3.2539062 0.0 3.2773437 1.835429E+29 4.5916347E-41 1.8354169E+29 4.5916347E-41 1.8230012E+29 4.5916347E-41)</div><div>#<A Foreign Pointer #xB90DF58></div><div>40</div><div>? (make-heap-ivector 10 'double-float)</div><div>#(1.0D-323 2.964394D-318 6.953251193885D-310 0.0D0 0.0D0 0.0D0 0.0D0 0.0D0 0.0D0 -2.0000000000000013D0)</div><div>#<A Foreign Pointer #xB9267A8></div><div>80</div><div>? </div><div><br></div><div>rg</div><div><br></div></div></div></body></html>