# Ask: how to transfer the parameter for the root scritpt

**URL:** <https://root-forum.cern.ch/t/ask-how-to-transfer-the-parameter-for-the-root-scritpt/13535>\
**Category:** ROOT\
**Created:** [December 20, 2011, 11:09pm UTC](https://root-forum.cern.ch/t/ask-how-to-transfer-the-parameter-for-the-root-scritpt/13535 "2011-12-20T23:09:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![lezhang](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/3bc359/32.png) [@lezhang](https://root-forum.cern.ch/u/lezhang)\
**Post date:** [December 20, 2011, 11:09pm UTC](https://root-forum.cern.ch/t/ask-how-to-transfer-the-parameter-for-the-root-scritpt/13535/1 "2011-12-20T23:09:54Z")

</div>

Hello rooters,

I will use an example to show my question:

1. my root script (DrawDiLepPlots.C) is like following:

void DrawDiLepPlots(int period=-1 ) {  
cout\<\<" period: "\<\<period\<\<endl;  
}

1. If you run command-“root DrawDiLepPlots.C”, the output is:  
period: -1

May I ask how could I change the period by this command line mode?  
I remember it is something like “root DrawDiLepPlots.C ( 3 )”. But it doesn’t work.

Can anybody tell me how to do it?

Thank you in advance!

Best regards

Lei

---

_[View the full topic](https://root-forum.cern.ch/t/ask-how-to-transfer-the-parameter-for-the-root-scritpt/13535)._
