[Ecls-list] Upcoming

Juan Jose Garcia-Ripoll juanjose.garciaripoll at gmail.com
Sun Jul 14 22:32:43 UTC 2013


On Sun, Jul 14, 2013 at 10:21 PM, Andy Hefner <ahefner at gmail.com> wrote:

>
> I don't think we're thinking the same thing. I don't want to do
> anything with the variable from Lisp, I simply want it defined in a
> scope that it such that the variable will continue to exist and be
> visible within other inline C blocks, and given a name that won't
> clash with variables generated by the ECL compiler. I suppose it is a
> different feature than what you described, since it need not
> correspond to a lisp variable at all.


Ok, this can be done with the new C-PROGN special form.

   (ffi:c-progn (a)
     "int my_variable;"
     (some-lisp-form)
     "my_variable = 2"
     (more computations)
     ...)))

Here "my_variable" is only for the C world and it's scope is preserved
along the computation.


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20130715/7a92be54/attachment.html>


More information about the ecl-devel mailing list