From: jurgen_defurne
Subject: How do I prevent double quotes from showing up in formatted strings ?
Date: 
Message-ID: <1166622415.153695.161010@f1g2000cwa.googlegroups.com>
Hello,

I have the following piece of code :

(format nil "test ~d/~d .... ~s" test-nr nr-of-tests (if condition "ok"
"nok"))

I have found out how to remove the outer quotes and the escapes by use
of the *print-escape* and *print-readable* variables, and using write
instead of print, but the "ok"/"nok" are still substituted together
with their quotes, ie. the result is :

    test 9/13 .... "ok"

instead of

    test 9/13 .... ok

How can I cure this ?

Regards,

Jurgen

From: Lars Rune Nøstdal
Subject: Re: How do I prevent double quotes from showing up in formatted strings ?
Date: 
Message-ID: <pan.2006.12.20.13.49.29.387835@gmail.com>
On Wed, 20 Dec 2006 05:46:55 -0800, jurgen_defurne wrote:

> Hello,
> 
> I have the following piece of code :
> 
> (format nil "test ~d/~d .... ~s" test-nr nr-of-tests (if condition "ok"
> "nok"))
> 
> I have found out how to remove the outer quotes and the escapes by use
> of the *print-escape* and *print-readable* variables, and using write
> instead of print, but the "ok"/"nok" are still substituted together
> with their quotes, ie. the result is :
> 
>     test 9/13 .... "ok"
> 
> instead of
> 
>     test 9/13 .... ok

(format nil "~S ~A" "hi" "ho") ==> "\"hi\" ho"

-- 
Lars Rune Nøstdal
http://nostdal.org/
From: jurgen_defurne
Subject: Re: How do I prevent double quotes from showing up in formatted strings ?
Date: 
Message-ID: <1166623016.791140.163340@n67g2000cwd.googlegroups.com>
Lars Rune Nøstdal wrote:
> On Wed, 20 Dec 2006 05:46:55 -0800, jurgen_defurne wrote:
>
> > Hello,
> >
> > I have the following piece of code :
> >
> > (format nil "test ~d/~d .... ~s" test-nr nr-of-tests (if condition "ok"
> > "nok"))
> >
> > I have found out how to remove the outer quotes and the escapes by use
> > of the *print-escape* and *print-readable* variables, and using write
> > instead of print, but the "ok"/"nok" are still substituted together
> > with their quotes, ie. the result is :
> >
> >     test 9/13 .... "ok"
> >
> > instead of
> >
> >     test 9/13 .... ok
>
> (format nil "~S ~A" "hi" "ho") ==> "\"hi\" ho"
>
> --
> Lars Rune Nøstdal
> http://nostdal.org/

Indeed.

I must have been almost sleeping yesterday evening, because I came
across the ~A format, and I even tried it.

Thanks.

Jurgen