// This is an unnamed macro... it's just a list of commands you could execute // from the ROOT command line, but that you've collected in a file instead // for ease of future use. // Note that all commands are enclosed within a set of curly brackets. // Execute this set of commands from the command line by doing ".x unnamed_macro.C" { std::cout << "Hello Duke REU students!" << std::endl; float x = 31.2; // Define a floating point variable 'x' and assign its value float y; // Define a floating point variable 'y' with no value assigned int i = 12; // Define an integer and assign its value. // Print these new variables to the screen std::cout << "x = " << x << std::endl; std::cout << "y = " << y << std::endl; std::cout << "i = " << i << std::endl; // Do some math and print the result y = x + i; std::cout << "The sum of x and i is: " << y << std::endl; }