Re: input parameter in batch mode

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Wed, 20 Apr 2005 10:33:06 +0200 (MEST)


Simply create a standard macro (say macro.C) like

void macro(const char* name="some default") {   printf("name = %s\n",name);
  ...
}

Rene Brun

On Wed, 20 Apr 2005,
Simioni Eduard wrote:

> Hi!
>
> In order to pass a parameter to the script in batch mode I could
> use the statement like shown in the user's guide:
>
> root -b -q 'macro.C(200)'
>
> or
>
> root -b -q 'macro.C(\"my_string\")'
>
> for a string: but how to use this variable inside the script? There is an
> default name?
>
> Thank you for any help.
>
> All the best
>
> ed.
>
Received on Wed Apr 20 2005 - 10:33:16 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET