[Ecls-list] How to print an object into a C string?

Juan Jose Garcia-Ripoll juanjose.garciaripoll at gmail.com
Fri Jan 25 17:24:55 UTC 2013


Use http://clhs.lisp.se/Body/f_wr_to_.htm and get the text from the string.


On Fri, Jan 25, 2013 at 5:59 PM, Alfred Steffens Jr <apsteffe at netwood.net>wrote:

> I want to print the result of an eval to a C string buffer:
>
> void eval_command (char *command_string)
> {
>         char buffer[128];
>         cl_object form, result;
>
>         form = c_string_to_object(command_string);
>
>         result = cl_safe_eval(form, Cnil, Cnil);
>
>         /*
>             Instead of using  princ(1,result) to stdout, I want a
> princ() into buffer[].
>         */
> }
>
>
> Al
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>



-- 
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/20130125/8fef09d7/attachment.html>


More information about the ecl-devel mailing list