From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: string-append *IS* broken!!! Date: Tue, 30 Dec 2003 18:30:05 -0800 Organization: Home Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <3FF234AD.525AFB1F@veritas.com> References: <3FF22FAA.FD22BC73@veritas.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1072837931 13524 80.91.224.253 (31 Dec 2003 02:32:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2003 02:32:11 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Dec 31 03:32:06 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AbW9W-0004oY-00 for ; Wed, 31 Dec 2003 03:32:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbX6L-0006WA-FY for guile-devel@m.gmane.org; Tue, 30 Dec 2003 22:32:53 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbX5q-0006N7-Jr for guile-devel@gnu.org; Tue, 30 Dec 2003 22:32:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbX5H-0005J6-Si for guile-devel@gnu.org; Tue, 30 Dec 2003 22:32:19 -0500 Original-Received: from [143.127.3.10] (helo=MTVMIME02.enterprise.veritas.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbX4z-0004wZ-SH for guile-devel@gnu.org; Tue, 30 Dec 2003 22:31:30 -0500 Original-Received: from megami (unverified) by MTVMIME02.enterprise.veritas.com (Content Technologies SMTPRS 4.3.12) with SMTP id for ; Tue, 30 Dec 2003 18:29:56 -0800 Original-Received: from bach.veritas.com ([172.22.12.213]) (1900 bytes) by megami via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Tue, 30 Dec 2003 18:29:55 -0800 (PST) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) Original-Received: from veritas.com (unknown [127.0.0.1]) by bach.veritas.com (Postfix) with ESMTP id 8AD8975810D for ; Tue, 30 Dec 2003 21:30:05 -0500 (EST) X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.18-3 i686) X-Accept-Language: en Original-To: guile development X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3148 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3148 Who in heck told string-append it "okay" to not do its job if the first string appeared to be quoted? That is utterly disgusting and completely counter-intuitive. How can you do that? That function has absolutely *NO* business trying to understand the contents of the strings I want to concatenate together. Bruce Korb wrote: > > Why is this code "wrong"? > > > (string-append (c-string (get "name")) ", ") > > As an experiment, I did this: > > (define c-str (c-string (get "name"))) > (shellf "echo 'c-str is set to -->%s<--' >&2" c-str) > (set! c-str (string-append c-str ", ")) > (shellf "echo 'c-str is set to -->%s<--' >&2" c-str) > > Here is the result: > > autogen -T getopt.tpl getpwnam-opts.def > c-str is set to -->"name"<-- > c-str is set to -->"name"<-- > c-str is set to -->"passwd"<-- > c-str is set to -->"passwd"<-- > c-str is set to -->"uid"<-- > c-str is set to -->"uid"<-- > c-str is set to -->"gname"<-- > c-str is set to -->"gname"<-- > > This works: > > (sprintf "%s, " (c-string (get "name"))) > > but should not be any different.....Am I confused or is this a bug? _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel