Problem with simple loop

From: Pasha Murat (murat@cdfsga.fnal.gov)
Date: Mon Oct 06 1997 - 19:53:12 MEST


C/C++ uses semicolumn and not comma as a separator. The following works:

int test() 
{

  for (Int_t j=0; j<1; j++) {
  }
  return 0;
}

						pasha.
--------------------------------------------------------------------------------
David Nitz writes:
 > I'm trying to use a macro to loop over number of histograms to generate
 > a multi-pad display.  But when I try to implement a simple loop, CINT
 > crashes.  Example of very simple program that fails is show below:
 > 
 > int test()
 > {
 > 
 >   for (Int_t j=0, j<1, j++) {
 >   }
 >   return 0;
 > }
 > 
 > Whem I try to execute this I get the following:
 > 
 > root [4] .x test.cxx
 > Error: Unexpected EOF G__fgetstream():2
 > FILE:/n/physics/umcdav/data2/users/dfnitz/auger/sim/elecsim/./test.cxx
 > LINE:8
 > Advice: You may need to use +P or -p option
 > Error: Unexpected EOF G__fgetstream():2
 > FILE:/n/physics/umcdav/data2/users/dfnitz/auger/sim/elecsim/./test.cxx
 > LINE:8
 > Advice: You may need to use +P or -p option
 > Error: Unexpected EOF G__fgetstream():2
 > FILE:/n/physics/umcdav/data2/users/dfnitz/auger/sim/elecsim/./test.cxx
 > LINE:8
 > Advice: You may need to use +P or -p option
 > Error: Unexpected EOF G__fgetstream():2
 > FILE:/n/physics/umcdav/data2/users/dfnitz/auger/sim/elecsim/./test.cxx
 > LINE:8
 > 
 > This repeats a few more times before root crashes.
 > 
 > 
 > David F. Nitz  (dfnitz@umich.edu)
 > Physics Department, University of Michigan



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