Re: [ROOT] RInt and address space

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Mon Oct 15 2001 - 10:17:21 MEST


Hi Brandon,

  to interpret a single line you can use TROOT::ProcessLine(), like:

gROOT->ProcessLine("int i=10");           
gROOT->ProcessLine("printf(\"%d\\n\",i);");

Each line executed this way shares the same address space in CINT.

Cheers, Fons.


> Brandon Kohn wrote:
> 
> Hi guys,
> 
> I'm trying to do something with the cint interpreter via an custom class that
> I created from TRInt.  Namely, I've added a method called ProcessCode(const
> char* code) which interprets a string of code.  I need this function so that I
> can interpret code on the fly, which I store as strings.  My question is does
> the interpreter run the code as a thread or a new process? (i.e. do they share
> an address space?)
> 
> Thanks
> Brandon Kohn
> +377 97 97 41 50 ext. 306 (Work)
> +377 97 77 86 71 (Home)
> Monaco

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:02 MET