Re: passing arguments

From: Thomas Lauf <thl_at_hll.mpg.de>
Date: Tue, 29 Nov 2011 09:44:50 +0100


Hello Giovanni!

Supposed your ROOT program/macro file looks like this:

   void Test( const Char_t* Text )
   {
     cout << Text << endl;
   }
Then you can do the following call in the ROOT shell:

   root [] .x Test.C("Hello World" )

Regards

Thomas Lauf

Feverati wrote:
> Dear experts,
>
> is it possible to pass arguments to a root program from the root command
> line, like in ordinary C/C++ ?
> For example, something like
>
> .x <filename> 2.3456
>
> doesn’t seem to work.
> In C/C++ it would be
>
> a.out 2.3456
>
> Thank you
>
> Giovanni
>

-- 
Dipl.Phys. Thomas Lauf
MPI Halbleiterlabor
Otto-Hahn-Ring 6
81739 Muenchen

Tel. : +49 89 839400 - 59
Fax. : +49 89 839400 - 13
Received on Tue Nov 29 2011 - 09:45:13 CET

This archive was generated by hypermail 2.2.0 : Tue Nov 29 2011 - 17:50:02 CET