RE:CINT: automatic var allocation and va

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Sat May 08 1999 - 15:31:27 MEST


Damir,

>I'm not sure removing the automatic allocation is a good point. The
>benefit is clear : less things to write for solving quick problems. If
>you remove that, people will probably feel cint a little bit more
>difficult to use. In fact I'm not sure.

Thank you for your reply. In that case, I keep auto allocation capability.

>One question, how, or is it possible to remove a variable (not a
>pointer) from cint. Say, I use v as an int, and see i made a small
>mistake and would like to declare it a long. Or I have declared i as an
>int in one macro, but i is declared as a long in another. I can imagine
>problems if the replacement is made automatically. But perhaps is there
>a way to force the removal of a variable (especially global) by calling
>a cint function. This way, the user would have to assess that he/she
>really wants to remove this variable. For now, I have to change all the
>occurences in one of the scripts (may be tiring) or restart root.

Removing a variable itself is simple, but entire problem is not so easy.
Already allocated variable may already be referenced in other location
in your program or ROOT classes. If you remove the variable only, it 
will create strange problem later. 

Supporting 'undo' command could be a better solution to keep cint 
operation clean.  

But this is not the only problem. ROOT keeps itsown object dictionary 
other than cint symbol table. This creates another set of issues.

So far, I've implemented '.undo' command in case you declare wrong
variable in cint5.14.2. This works reasonably. This is a clean 
operation for cint, but not necessarily so for entire ROOT system.

Thank you
Masaharu Goto



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:32 MET