[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] char=? question
From: |
Ivan Raikov |
Subject: |
Re: [Chicken-users] char=? question |
Date: |
Thu, 12 Jun 2008 22:33:37 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
What are W1, W2, bar1, bar2? They are not defined anywhere...
(char=? #\R (vector-ref (vector #\W #\R) 1)) returns #t as expected.
-Ivan
William Ramsay <address@hidden> writes:
> A quick question. I may be going going insane.
>
> I have the following code:
>
> (define foo
> (lambda (v)
> (let
> ((wa (vector-ref v W1))
> (wb (vector-ref v W2)))
>
> (if (> wb 0)
> (if (char=? wa #\R)
> (bar1 wa wb)
> (bar2 wa wb))))))
>
> This gets a char from the vector, checks to see if it is an R or an S
> and does it's thing. The problem is that the test for (char=? wa
> #\R) ALWAYS is false. The vector contains R's and S's. Testing
> the value of wa with (char? wa) is true.
>
> What on earth is going on and what else can I use to check for an R or
> an S????
>
> Bill