[Unimportant...] Multiple Commands on one line?

Hi rooters,
I was wondering whether there’s a way to have multiple commands in one line of the interpreter. Is there?
This is not important of course :wink:: What I’m doing is a “.L mymacro.C+” on the one line, and a “MyFunction()” on the next. Going back and fro while coding, I recompile a lot, test, edit, recompile etc. (oh. yes. bad style. I know… :unamused: ) Now, if I could just have a line such as “.L mymacro.C+ && MyFunction()” this would make the frequent “[arrow-up][arrow-up][return][arrow-up][arrow-up][return]” sequence become “[arrow-up][return]”. So you see, nothing important really, but nice to have… :wink:
Rafi :smiley:

you can specify multiple instructions in the same line, eg

gROOT->ProcessLine("hpx.Draw();TCanvas *c2=new TCanvas(\"c2\");hpxpy.Draw();")

Either I’m missing something… :wink:

root [42] .L mymacro.C+; MyFunction() Warning in <TRint::ProcessLine>: argument(s) "()" ignored with .L Error in <TRint::ProcessLine>: macro mymacro.C+; MyFunction not found in path .:./macros
Yes of course it works with commands, but not with the dot-commands :stuck_out_tongue:
Thanks for the reply though…
Rafi :smiley:

there’s a TROOT / TSystem replacement for many dot commands. You can e.g. use gROOT->LoadMacro(“myMacro.C+”); myFunc().


Cool! 8)
That’s what I was looking for - thank you!
Rafi :smiley:
edit: gROOT->LoadMacro does the job.