It's not scsh that you're misunderstanding, it is scheme. You are
attempting to use the quote operator as shorthand for "list", but it is
somewhat different.
"'" quotes whatever follows it literally. So, 'a is the literal symbol
"a", and '(a b c) is a list composed of the literal symbols "a", "b",
and "c". '("" a b) => (list "" 'a 'b).
What you want is (list "" a b).
-----Original Message-----
From: David S. [mailto:davids@idiom.com]
Sent: Saturday, January 19, 2002 3:17 PM
To: scsh@zurich.ai.mit.edu
Subject: Dumb newbie's question
I'm using scsh-0.6.0 on NetBSD 1.5.2, and I'm having some trouble
understanding the 'path-list->file-name' function:
% scsh
Welcome to scsh 0.6.0 (Chinese Democracy)
Type ,? for help.
> (path-list->file-name '("" "usr" "local"))
"/usr/local"
>
... which is just like the example in the manual. But
> (let ((a "usr") (b "local")) (path-list->file-name '("" a b)))
Error: exception
wrong-type-argument
(string-length 'b)
1>
That can't be right, can it? I see the same error in essentially the
same context from 'string-join' - I'm guessing that
'path-list->file-name'
is just some sort of macro on top of 'string-join'. In contrast, with
'scm':
% scm
...
> (require 'batch)
...
> (let ((a "usr") (b "local")) (string-join "/" a b))
;Evaluation took 0 mSec (0 in gc) 158 cells work, 1828 env, 61
bytes other
"usr/local"
What don't I understand about 'scsh'?
David S.
|