On Sep 18, 5:11 pm, Frank Goenninger DG1SBG <·············@nomail.org>
wrote:
> Yeah, I know, I should know why this doesn't work, but I seem to be
> mind-blocked ...
[...]
> Clearly, the (when ...) statement does not fire - but
> whatever thing I tried ... I can't seem to get the (member ...) tests
> to return t...
I'm going to take a bit of a stab in the dark (since I don't know for
sure what up$ does), and guess that you need to use a different :TEST
argument (like #':STRING=, maybe) for MEMBER. It defaults to #'EQL,
which isn't going to do the right thing for, say, two strings, or a
string and a symbol. Since SYMBOL-NAME returns a string....
Cheers,
Pillsy
From: Frank Goenninger DG1SBG
Subject: Re: Why oh why does this not work ? (member ...)
Date:
Message-ID: <lzps0fbra8.fsf@de.goenninger.net>
Pillsy <·········@gmail.com> writes:
> On Sep 18, 5:11 pm, Frank Goenninger DG1SBG <·············@nomail.org>
> wrote:
>> Yeah, I know, I should know why this doesn't work, but I seem to be
>> mind-blocked ...
> [...]
>> Clearly, the (when ...) statement does not fire - but
>> whatever thing I tried ... I can't seem to get the (member ...) tests
>> to return t...
>
> I'm going to take a bit of a stab in the dark (since I don't know for
> sure what up$ does), and guess that you need to use a different :TEST
> argument (like #':STRING=, maybe) for MEMBER. It defaults to #'EQL,
> which isn't going to do the right thing for, say, two strings, or a
> string and a symbol. Since SYMBOL-NAME returns a string....
>
> Cheers,
> Pillsy
Ouch. That does it. Thanks!!
Frank
--
Frank Goenninger
frgo(at)mac(dot)com
"Don't ask me! I haven't been reading comp.lang.lisp long enough to
really know ..."
Frank Goenninger DG1SBG <·············@nomail.org> writes:
> ;; Remark: function up$ returns a string with all characters being
> UPPER CASE letters
Why not just use STRING-UPCASE? It even works with string designators
like symbols.
In general, it's not clear why you are using strings instead of symbols
for your module and function name keys. Do you find yourself running
into package issues?
> (defun logmsg-fn (msg-class package method method-desc msg &rest msg-args)
> (format t "~a ~a" (type-of (up$ (symbol-name method))) package)
> (when (and (member (up$ (symbol-name method)) *debug-functions*)
> (member *module* *debug-modules*))
EQL, the default test of MEMBER won't work reliably with strings.
They would have to be the identical string object.
--
Thomas A. Russ, USC/Information Sciences Institute