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: Is string-append broken? Date: Tue, 30 Dec 2003 18:08:42 -0800 Organization: Home Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <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 1072836657 10855 80.91.224.253 (31 Dec 2003 02:10:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Dec 2003 02:10:57 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Dec 31 03:10:52 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 1AbVoy-0003zC-00 for ; Wed, 31 Dec 2003 03:10:52 +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 1AbWlb-0004mD-3O for guile-devel@m.gmane.org; Tue, 30 Dec 2003 22:11:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbWkm-0004lx-UH for guile-devel@gnu.org; Tue, 30 Dec 2003 22:10:36 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbWkG-0004cb-RQ for guile-devel@gnu.org; Tue, 30 Dec 2003 22:10:35 -0500 Original-Received: from [143.127.3.10] (helo=MTVMIME03.enterprise.veritas.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbWkF-0004cP-Mx for guile-devel@gnu.org; Tue, 30 Dec 2003 22:10:03 -0500 Original-Received: from megami (unverified) by MTVMIME03.enterprise.veritas.com (Content Technologies SMTPRS 4.3.12) with SMTP id for ; Tue, 30 Dec 2003 18:08:33 -0800 Original-Received: from bach.veritas.com ([172.22.12.213]) (1459 bytes) by megami via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Tue, 30 Dec 2003 18:08:33 -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 E509A75810D for ; Tue, 30 Dec 2003 21:08:42 -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:3147 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3147 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