RE: [ROOT] Cint Bug?

From: Philippe Canal (pcanal@popgtw.fnal.gov)
Date: Tue Aug 29 2000 - 18:20:40 MEST


Hi Isidro,

Thank you for reporting this problem.  It only appears in root (and not 
in cint).

You can work around this problem by either
	a) move the const declaration outside of the function
	b) remove the const.

Philippe.

> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Isidro Gonzalez
> Caballero
> Sent: Tuesday, August 29, 2000 9:57 AM
> To: Root mailing list
> Subject: [ROOT] Cint Bug?
> 
> 
> Hi,
> 	I am getting an error message with the simple following code: 
> 
> void junk() {
>   const Double_t Mneutron = 939.56533 * 0.001; //GeV
>   const Double_t Mproton  = 938.27200 * 0.001; //GeV
>   const Double_t MNucleon = 0.5*(Mneutron + Mproton);
> }
> 
> root [0] .x junk.C 
> *** Interpreter error recovered ***
> 
> 
> If I remove the third 'const' the problem dissapears. But I think is quite
> normal to have constants defined from other constants. Is this a bug, a
> limitation or am I doing something wrong?...
> 
> I am using  Root Version   2.25/01     9 August 2000 , under Linux RH6.2.
> 
> 	Cheers:
> 
> 		Isidro
> 
> 
> +---------------------------+--------------------------------+
> | Isidro González Caballero | mailto:Isidro.Gonzalez@cern.ch |
> | CERN-EP / Mailbox: F28010 | http://home.cern.ch/~iglez/    |
> | 1211 Geneva 23            |               -o-              |
> | Switzerland               | Tel: +41 22 76 73060, 73316    |
> +---------------------------+--------------------------------+
> 
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET