C block comments and unnamed script question

Hello,
Please bear with me for another newby question…

I’ve been working with a simple un-named script, and I jumped into the next problem:
when I used C style block comments like:

/*
a few lines
of comment
*/

outside the brackets of the script, I got some error message which doesn’t really point me to the real problem…

Of course, I read again the manual, and there it is explicitely said that an un-named script MUST start with a bracket, but what I didn’t understood afterwards is that changing the type of comments to:

//a few lines
//of comments

makes the code working again. How does then ROOT treats the comments? And why the block-type ones are treated as comments inside the brackets? Is this not some kind of inconsistency?

Simple example (I’m using ROOT version 3.10/03):

/*
a few lines of
comments
*/
{
#include <iostream.h>
cout << “Hello” << endl;
float x = 3.;
float y = 5.;

cout << "x = "<< x << "y = " << y << endl;
}

The error message:
“Error: class,struct,union or type unknown not defined FILE:unnamed_script.C LINE:8
*** Interpreter error recovered ***”.

Thank you,
Angela.

You can use C style comments in the function body, not outside.
Note that iostream.h is not required in a cint script.
The following script should work

Rene

[code]//*
//a few lines of
//comments
///
{
//#include <iostream.h>
/

a few lines of
comments
*/
cout << “Hello” << endl;
float x = 3.;
float y = 5.;

cout << "x = "<< x << "y = " << y << endl;
} [/code]