From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13897 invoked by alias); 20 Oct 2004 22:22:08 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13885 invoked from network); 20 Oct 2004 22:22:08 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 20 Oct 2004 22:22:08 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CKOqN-0003Ss-GE; Wed, 20 Oct 2004 18:22:07 -0400 Date: Wed, 20 Oct 2004 23:48:00 -0000 From: Daniel Jacobowitz To: Brendan Doherty Cc: gdb@sources.redhat.com Subject: Re: Type identification within a user defined commands Message-ID: <20041020222207.GB13185@nevyn.them.org> Mail-Followup-To: Brendan Doherty , gdb@sources.redhat.com References: <7D8E31C9DCC5204AB4AA23315B352F5B2F0DE6@exchange.talgentra.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7D8E31C9DCC5204AB4AA23315B352F5B2F0DE6@exchange.talgentra.co.nz> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-10/txt/msg00389.txt.bz2 On Thu, Oct 21, 2004 at 10:35:56AM +1300, Brendan Doherty wrote: > Is it possible to identify the type of a variable passed to a user > defined command. > > I'm trying to create a prettier print that displays information about > the various classes that we use. > I want to use the type to access attributes specific to that class. > > What I am trying to do is considerable more complex than the example > below, bug it demostrates what I want to do. No, it isn't possible. You'd need a real scripting language for this; a Perl implementation was posted, and someone has said they're working on a Guile implementation. -- Daniel Jacobowitz