From: Russell McManus on

What is the expected return value of this form?

(format nil "'~A' <= logdate and logdate < '~:*'" 1)

I was expecting:

"'1' <= logdate and logdate < '1'"

but I get

"'1' <= logdate and logdate < ''"

in both sbcl and clisp.

-russ

From: John Thingstad on
P� Mon, 05 May 2008 22:25:24 +0200, skrev Russell McManus
<russell_mcmanus(a)yahoo.com>:

>
> What is the expected return value of this form?
>
> (format nil "'~A' <= logdate and logdate < '~:*'" 1)
>
> I was expecting:
>
> "'1' <= logdate and logdate < '1'"
>
> but I get
>
> "'1' <= logdate and logdate < ''"
>
> in both sbcl and clisp.
>
> -russ
>

Check again! (CLHS 22.3.7.1) ~:* just backs up one argument.
Now if you actually want to print it again add a ~A

CL-USER 2 > (format nil "'~A' <= logdate and logdate < '~:*~A'" 1)
"'1' <= logdate and logdate < '1'"

--------------
John Thingstad
From: Russell McManus on
"John Thingstad" <jpthing(a)online.no> writes:

> Check again! (CLHS 22.3.7.1) ~:* just backs up one argument.
> Now if you actually want to print it again add a ~A
>
> CL-USER 2 > (format nil "'~A' <= logdate and logdate < '~:*~A'" 1)
> "'1' <= logdate and logdate < '1'"

Thanks! I knew I was missing something simple...

-russ