From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Shann Newsgroups: gmane.lisp.guile.user Subject: A variable that holds a string which may be the name of a variable. Date: Wed, 02 Dec 2009 19:22:07 +0000 Message-ID: <1259781727.3060.16.camel@debianrts.home> Reply-To: richard.shann@virgin.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259791478 22251 80.91.229.12 (2 Dec 2009 22:04:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Dec 2009 22:04:38 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Dec 02 23:04:30 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NFxJ9-0005qx-Ef for guile-user@m.gmane.org; Wed, 02 Dec 2009 23:04:23 +0100 Original-Received: from localhost ([127.0.0.1]:46943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFxJ9-0007Cl-4v for guile-user@m.gmane.org; Wed, 02 Dec 2009 17:04:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFuse-0003hw-JA for guile-user@gnu.org; Wed, 02 Dec 2009 14:28:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFusa-0003dF-Mn for guile-user@gnu.org; Wed, 02 Dec 2009 14:28:52 -0500 Original-Received: from [199.232.76.173] (port=54415 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFusa-0003d0-Ef for guile-user@gnu.org; Wed, 02 Dec 2009 14:28:48 -0500 Original-Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]:62837) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFusa-0003WX-2i for guile-user@gnu.org; Wed, 02 Dec 2009 14:28:48 -0500 Original-Received: from know-smtpout-4.server.virginmedia.net ([62.254.123.4]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20091202192845.WTXH27507.mtaout02-winn.ispmail.ntl.com@know-smtpout-4.server.virginmedia.net> for ; Wed, 2 Dec 2009 19:28:45 +0000 Original-Received: from [87.114.68.113] (helo=[192.168.2.3]) by know-smtpout-4.server.virginmedia.net with esmtpa (Exim 4.63) (envelope-from ) id 1NFusX-0001Zj-NT for guile-user@gnu.org; Wed, 02 Dec 2009 19:28:45 +0000 X-Mailer: Evolution 2.22.3.1 X-Cloudmark-Analysis: v=1.1 cv=W3tOLUehizD4qj6VhtReFuw5MKb8d+XqjIxlDsIazEA= c=1 sm=0 a=QhkXpYW9UC8A:10 a=tOnwS5-cS8YA:10 a=YKRPQzxHUFxdFIbcrD8A:9 a=Cr-tmwKnpGn2xbYGJoXa5Me6wqoA:4 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7510 Archived-At: I am stuck on one of those symbol/variable-name-in-a-string things again: (define mything "display") (display (eval-string mything)) that's fine. But can I test that the string in mything is the name of a variable before doing the eval-string and finding out the hard way? I've been doing (symbol? mything) etc, and going witless. Do I have to do all that catch stuff? The situation is that I can guess (programmatically construct that is) the name of the variable, but it may not be defined. If it isn't I will just say so, but if it is I want the string it is defined to hold. Any help much appreciated! Richard Shann