[ROOT] scope of local variables in cint

From: Walter F.J. Mueller (W.F.J.Mueller@gsi.de)
Date: Fri May 02 2003 - 15:23:55 MEST


Dear ROOTers,

the attached little script "demo.C" works fine when executed
with ACLiC. However, when just interpreted with CINT I get
the error message

   Processing demo.C...
   Error: p already declared as different type FILE:demo.C LINE:17
   *** Interpreter error recovered ***

So CINT seems to have a problem handling the scope of the
variables correctly. It seems that somehow the type of the first
declaration of 'p' is memorized and the interpreter chokes when a
variable with this name is declared a second time.

Is this a restriction in CINT ?


		Cheers,	Walter

--
Walter F.J. Mueller   Mail:  W.F.J.Mueller@gsi.de
GSI,  Abteilung KP3   Phone: +49-6159-71-2766
D-64291 Darmstadt     FAX:   +49-6159-71-2989
WWW:   http://www-kp3.gsi.de/www/kp3/people/mueller.html





This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET