[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stupid zetalisp question about /
Date: Mon, 1 Jul 91 17:18:10 -0600
From: firstname.lastname@example.org (David R. Strip)
I am trying to create the string "/*" (*comment-begin* for
c-mode) in a function defined in a file with zetalisp syntax.
Needless to say if you type "/*", the string is really "*".
What I don't understand is why "//*" is "//*" instead of
It's not; you're confusing yourself. Reading "//*" gives the
two-character string with #\/ and #/*. But PRINT and
READ must be consistent, so that calling READ on the output
of PRINT must yield a string with the same characters.
So if you do (PRINT (READ)) "//*", you'll see "//*",
but if you do (CL:LENGTH (READ)) "//*" you'll see 2,
and if you do (CL:COERCE (READ) 'LIST) "//*", you'll see
The same thing will happen in Common Lisp syntax, with
the character \.