Here is a problem (again!) with using a pil backquote expression,
where the user, like you or me, is stuck on "CL-unquote thinking".

Let's call g again, but now we switch the places of the dates and
times.  In this case, we might expect the answer now to be "No";
however, the answer will remain "Yes".

: (g Is $S1$ before $S2$?
   The answer is
   `(if (and
           (<= $D2$ $D1$)
           (<= $T2$ $T1$) )
       "No" ) )
-> "Is \"1999-09-09 20:12:05\" before \"2000-03-04 18:03:03\"? The
answer is \"Yes\""


Because when the backquote expression gets resolved by the reader, the
symbols $D1$, $D2$, $T1$, and $T2$ are not bound to any values
(i.e. will evaluate to NIL).  And since

(<= NIL NIL)

evals to T, g will always see "Yes" as its last argument.

Sorry.  That means you have to come up with another way to eval "code"
in your DSL (i.e the stuff under g).

I hope this make sense.  This is what Alex has been trying to tell us
all along.  (I only now just realized this; so you can see how far
I've come along: not much.)

Best, --Rick

Reply via email to