Hi,
The following code prints out an unwanted stream of "(unsigned char)0"
to the console:
{
char *input;
TTimer *timer = new TTimer("gSystem->ProcessEvents()", 250, kFALSE);
do {
timer->TurnOn();
timer->Reset();
input = Getline("Type <return> to exit: ");
timer->TurnOff();
} while (!input);
}
With the addition of a semicolon to the end of the command string
passed to the TTimer constructor, the code works as expected (waiting
silently for input):
{
char *input;
TTimer *timer = new TTimer("gSystem->ProcessEvents();", 250, kFALSE);
// ^
do {
timer->TurnOn();
timer->Reset();
input = Getline("Type <return> to exit: ");
timer->TurnOff();
} while (!input);
}
Why? Is this what's supposed to happen?
I've been running this code under ROOT 3.01/02 14 May 2001 on Red Hat
Linux 6.1 on an i386.
Thank you.
David
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:48 MET