Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!fnnews.fnal.gov!gw1.att.com!nntpa!ssbunews!ssbunews.ih.att.com!lgm
From: lgm@polaris.ih.att.com (Lawrence G. Mayka)
Subject: Re: making strings with make-array
In-Reply-To: paley@ai.sri.com's message of 03 Feb 1995 03:15:23 GMT
Message-ID: <LGM.95Feb5200359@polaris.ih.att.com>
Sender: news@ssbunews.ih.att.com (Netnews Administration)
Nntp-Posting-Host: polaris.ih.att.com
Organization: AT&T Bell Laboratories, Naperville, Illinois, USA
References: <PALEY.95Feb2191523@Cayucos.ai.sri.com>
Distribution: usa
Date: Mon, 6 Feb 1995 02:03:59 GMT
Lines: 25

In article <PALEY.95Feb2191523@Cayucos.ai.sri.com> paley@ai.sri.com (Suzanne Mercer Paley) writes:

   I tried making a string by calling (make-array n :element-type
   'character), but instead of a string, I got a
   #<Simple-Vector T 25 2CE085E>, which neither looks like a string, nor
   does it appear to be coercible to a string.  Is there a way to do what
   I want while remaining within the new spec?  (I'd be happy to use
   string-chars, which work, but I'm worried about them disappearing from
   future versions of lisp.)

CLtL2 certainly provides a character type that is guaranteed to result
in a string: BASE-CHARACTER.  (I believe that in ANSI Common Lisp,
this has been renamed to BASE-CHAR.)

However, CLtL2 is ambiguous about whether a (VECTOR CHARACTER) must be
a STRING.  The closest it comes to such an assertion is a clause in
the description of MAKE-STRING: "If :ELEMENT-TYPE is omitted, the type
CHARACTER is the default."  I believe that ANSI Common Lisp settles
the matter more clearly, that a (VECTOR CHARACTER) must be a STRING.
--
        Lawrence G. Mayka
        AT&T Bell Laboratories
        lgm@ieain.att.com

Standard disclaimer.
