From owner-freebsd-questions Wed Jul 25 12:53:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from imo-d04.mx.aol.com (imo-d04.mx.aol.com [205.188.157.36]) by hub.freebsd.org (Postfix) with ESMTP id 98C7137B406 for ; Wed, 25 Jul 2001 12:53:28 -0700 (PDT) (envelope-from GDastgir@aol.com) Received: from GDastgir@aol.com by imo-d04.mx.aol.com (mail_out_v31.7.) id n.74.d9f354f (17528) for ; Wed, 25 Jul 2001 15:53:21 -0400 (EDT) From: GDastgir@aol.com Message-ID: <74.d9f354f.28907db0@aol.com> Date: Wed, 25 Jul 2001 15:53:20 EDT Subject: tcl/tk To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="part1_74.d9f354f.28907db0_boundary" X-Mailer: AOL 6.0 for Windows UK sub 10503 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --part1_74.d9f354f.28907db0_boundary Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I'm using tcl/tk 8.1 that came with my fbsd 2.2.6. I'm still learning tcl and am playing around with the wish shell writing interactive tcl commands/scripts. This is all going fine except for one thing. I'm using tcl lists and the lreplace command that replaces elements in a list, syntax: lreplace list first last when this command is run the command line appears to confirm the relevant list element replacement. However, when I run the set command on the list (or puts) to reconfirm that the contents of the list have changed - the list is displayed unchanged. Why is this? I've checked Ousterhout's book and can't see what I'm doing wrong. Thanks, Ghulam --part1_74.d9f354f.28907db0_boundary Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: 7bit I'm using tcl/tk 8.1 that came with my fbsd 2.2.6.
I'm still learning tcl and am playing around with the wish shell writing
interactive tcl commands/scripts. This is all going fine except for one
thing. I'm using tcl lists and the lreplace command that replaces elements in
a list, syntax:

   lreplace list first last <args>

when this command is run the command line appears to confirm the relevant
list element replacement. However, when I run the set command on the list (or
puts) to reconfirm that the contents of the list have changed - the list is
displayed unchanged.

Why is this? I've checked Ousterhout's book and can't see what I'm doing
wrong.

Thanks,

Ghulam
--part1_74.d9f354f.28907db0_boundary-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message