Hi, thank you for reply. What I want to do is to re-declare a variable with different type or once remove the old variable. reinterpret_cast does not help this, does it? If needless variable cannot be removed, it sounds quite inconvenient. Best regards, S.Kameoka From: Ji Li <liji@jlab.org> Subject: Re: [ROOT] How to disable a variable Date: Sun, 4 May 2003 06:34:01 -0400 (EDT) Message-ID: <3285.129.57.166.243.1052044441.squirrel@webmail.jlab.org> > > Try > root [3]reinterpret_cast<double> a > > > Hi all, > > > > Is there any way to disable a once declared variable without > > gROOT->Reset in interactive session? > > gROOT->Reset deletes all the variables and not always desirable. > > Typical case is that a variable is declared with wrong type by mistake > > as follows: > > > > ******************************************* > > * * > > * W E L C O M E to R O O T * > > * * > > * Version 3.04/02 11 January 2003 * > > * * > > * You are welcome to visit our Web site * > > * http://root.cern.ch * > > * * > > ******************************************* > > > > FreeType Engine v1.x used to render TrueType fonts. > > Compiled for linux with thread support. > > > > CINT/ROOT C/C++ Interpreter version 5.15.68, Dec 12 2002 > > Type ? for help. Commands must be C++ statements. > > Enclose multiple statements between { }. > > root [0] int a > > root [1] double a > > Error: a already declared as different type FILE:/tmp/kkhYoc_cint LINE:1 > > *** Interpreter error recovered *** > > root [2] > > > > Best regards, > > S.Kameoka > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET