This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: list->string with problems?


in scheme:
"a" is a literal for a string (ie it is a different datatype from a
character)
'a  is a literal for a symbol 
#\a is a literal for a character

list->string takes a list of characters and return a string with these
characters.
maybe you are looking for another function
(string-append "a" "b")
=> "ab"

Christof Lehmann wrote:
> 
> I have tried this:
> #|kawa:1|# (list->string '("A" "B" "C"))
> Argument #2 to 'string-set!' has wrong type
> 
> 
> Am Mi, den 10.03.2004 schrieb Marco VEZZOLI um 12:02:
> > Christof Lehmann wrote:
> > >
> > > (list->string '(a b c))
> > > throws the error
> > > Argument #2 to 'string-set!' has wrong type
> > >
> > > I use Kawa 1.7
> > >
> > > Christof
> >
> > I think you should use
> >
> > (list->string '(#\a #\b #\c))
> >
> > with your code you are trying to put a list of symbols into a string
> >
> > '(a b c) == (list 'a 'b 'c)

-- 
Marco Vezzoli	   tel. +39 039 603 6852
STMicroelectronics fax. +39 039 603 5055


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]