Perhaps someone can explain this behaviour of ROOT to me.
I have a macro , which I am using to draw a TGraph. I use
[color=red]Float_t[/color] x[10], y[10];
for(Float_t i =0 ; i< 10; i++){
x[i] = 0.8 * i;
y[i] = 0.9;
}
Note the i is a float! There is no complaint from the intrepreter but when I try to draw a TGraph using
TGraph *gr = new TGraph(10, x, y);
I get a TGraph consisting of only 2 points (and not the ones I am expecting)/
I can print out the array contents in the loop and they are what they should be.
Now if you use
x[color=red[/color] i] = 0.8*i;
etc
then it works perfectly.
Does anyone know what happens when you pass a float as an array index?
Heather