[ROOT] Compiler/Interpreter ?

From: Frederic Sarazin (sarazin@triumf.ca)
Date: Sat Feb 16 2002 - 02:49:05 MET


Hello Root'er,

In my program (a script that I load with the .L command), I've got
the following lines:

   cout << gPad << endl;

   if (Pads==0)
     {
        ...
       gPad = (TPad*)gPad->GetMother();
        ...
     }
   else
     {
        cout << gPad << endl;
        ...
     }

    In my case, the value of "Pads" is not 0... so the two print-out of
gPad should
be identical. I trace the problem down to the command I left in the if
loop... the
problem is that this part is not accessed by the program when executed.

I tried a few other things (use of a temporary variable then a copy of
the pointer
into gPad, a difference cast...) but nothing seems to work.

Thanks for your help.

Fred



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET