[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCM to C string

From: Viktor Pavlenko
Subject: Re: SCM to C string
Date: Thu, 20 Jun 2002 18:10:15 -0400

>>>>> "BV" == Brett Viren <address@hidden> writes:

    BV> Viktor Pavlenko writes:
    >> For instance I'd like convert SCM object which contains '("a"
    >> 1) into C string "(\"a\" 1)".

    BV> Why do you need to escape the double quotes?  If you have a
    BV> null terminated string, you should be able to print it (or
    BV> pass it to a Gui or whatever) in C just fine.  Or do I miss
    BV> something.

You don't miss anything. I escaped the quotes to be able to show the
whole string in quotes.

    BV> I asked a similar question some time back, maybe the following
    BV> can help.  It turns a scheme procedure into its coresponding
    BV> source code.  But, I guess it will fail to do what you want
    BV> for compiled procedures as well as arbitrary scheme forms.
    BV> The following is C++, if you are using strict C just return
    BV> the "cptr" and ignore the "string" object.

I use C++. Thanks a lot!


    BV> [code]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]