This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: I've moved to SCO...


On Sun, 26 Mar 2000, Bruce Korb wrote:

> > `raw-shell-str' - single quote shell string
> > -------------------------------------------
> > 
> >    Usage:  (raw-shell-str string)
> > Convert the text of the string into a singly quoted string that a
> > normal shell will process into the original string.  (It will not do
> > macro expansion later, either.)  Contained single quotes become
> > tripled, with the middle quote escaped with a backslash.  Normal shells
> > will reconstitute the original string.
> 
> Only the first three work.  On the last one, the result string
> contains single quotes at the start and end of the string, but
> the SCM containing the string at the return from gh_evalstr()
> DOES NOT!!  That is hopelessly, terribly, awfully, irretrievably broken.
> Unless there is a different routine to call that does not do this
> mutilation, I have two points:

I have to admit that I don't quite get what you are actually doing in
your code.  Can you give some examples what you want to happen in contrast
to what is actually being produced?  Can you also give some more detail
about your implementation?  If you are using gh_evalstr to perform string
conversions then this is most probably not the right way of doing it.

For example:
(define foo "'test")
(display foo)                    --> 'foo
(write foo)                      --> "'foo"
(define bar (eval-string foo))
(display bar)                    --> foo
(write bar)                      --> foo
(symbol? bar)                    --> #t

When evaluating that quoted string, eval-string will just treat it as
scheme code.

Sorry if I misunderstood your problem.

Best regards
Dirk Herrmann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]