Replies: 4 comments
-
|
The error is actually a good clue as |
Beta Was this translation helpful? Give feedback.
-
|
Use CHARCODE.DECODE, that's the function that evaluates its argument, CHARCODE quotes its argument.
(CHARCODE SPACE) is equivalent to (CHARCODE.DECODE (QUOTE SPACE)), but typically more convenient.
Note that SELCHARQ is also a macro that expands to a SELECTQ applying CHARCODE.DECODE to each of its selection keys, also convenient.
… On Dec 28, 2025, at 9:31 AM, Paolo Amoroso ***@***.***> wrote:
The error is actually a good clue as CHARCODE is treating the CHAR litatom as its argument, not the value of the CHAR parameter of FOO. So how do I obtain the intended behavior?
—
Reply to this email directly, view it on GitHub <#2429 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQSTUJLVP3HHYRX63OTBZWD4EAHWLAVCNFSM6AAAAACQFWM55KVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMZVG43DMNA>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
|
Using |
Beta Was this translation helpful? Give feedback.
-
It also isn't quite equivalent becauses the lookup of the symbol SPACE to find 20 happens at compile(macro expansion) time, while the code using CHARCODE.DCODE calls CHARCODE.DECODE at runtime. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to figure out how to pass a character to a funtion as an argument and in turn pass the argument to
CHARCODEfrom within the function, like in this test:Why do I get the error? Examining the code of
CHARCODEandCHARCODE.DECODEdidn't ring any bells.Beta Was this translation helpful? Give feedback.
All reactions