What's the right way to have an array inside the interactive shell?


Current ROOT version is 6.26/08. Just define an array like the following (doesn’t matter what types the array is, symptom is the same).

root [6] uint8_t bin[]={1,0,0,1,0,0,0,0,1,1,0};
root [7] bin[0]
(unsigned char) ‘0x01’
root [8] bin[1]
(unsigned char) ‘0x01’

Looks like the array can’t be indexed inside the shell?



It looks to be platforms dependent (i.e. your example works fine for me). So if you are using 32bit build, Wile might have the right pointer.

Thanks for the links. Now understand why. I built ROOT from Visual Studio. From the links, it seemed VS had used win32 instead of win64 (this is a 64-bit machine). In addition to use 6.27.01.win64, is there a switch to force VS to use win64?

Correct. Linux 64-bit doesn’t have this issue. Only happen in Windows