<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 14, 2013 at 10:21 PM, Andy Hefner <span dir="ltr"><<a href="mailto:ahefner@gmail.com" target="_blank">ahefner@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
</div>I don't think we're thinking the same thing. I don't want to do<br>
anything with the variable from Lisp, I simply want it defined in a<br>
scope that it such that the variable will continue to exist and be<br>
visible within other inline C blocks, and given a name that won't<br>
clash with variables generated by the ECL compiler. I suppose it is a<br>
different feature than what you described, since it need not<br>
correspond to a lisp variable at all.</blockquote></div><br>Ok, this can be done with the new C-PROGN special form.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> (ffi:c-progn (a)</div><div class="gmail_extra">
"int my_variable;"</div><div class="gmail_extra"> (some-lisp-form)</div><div class="gmail_extra"> "my_variable = 2"</div><div class="gmail_extra"> (more computations)</div><div class="gmail_extra">
...)))</div><div class="gmail_extra"><br></div><div class="gmail_extra">Here "my_variable" is only for the C world and it's scope is preserved along the computation.</div><div class="gmail_extra"><br clear="all">
<div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a>
</div></div>