Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#14 Strings can't be concatenated?

closed-invalid
Bruno Haible
clisp (525)
5
2000-06-16
2000-06-14
Brent Meeker
No

I've generally programmed in Scheme and I'm transferring some things to CLisp. I find that there is no simple substitute for "stringappend"? From reading Steele, Ch-14, pg 388, I thought that concatenate would work since a string is a one-dimensional array of characters - but apparently not:

> (arrayp "hello")
T
> (concatenate "hel" "lo ")

*** - There are no sequences of type "hel"
1. Break> (svref "hello" 1)

*** - SVREF: "hello" is not a simple-vector

I'm puzzled!

vr, Brent Meeker

Discussion

  • Bruno Haible
    Bruno Haible
    2000-06-16

    • assigned_to: nobody --> haible
    • status: open --> closed-invalid
     
  • Bruno Haible
    Bruno Haible
    2000-06-16

    Please look up the description of concatenate, svref and aref.
    The first argument to concatenate must be a sequence *type*.
    The first argument to svref must be a "simple-vector"; look up
    what that means.