#define problem.

From: Tomasz Motylewski (motyl@stan.chemie.unibas.ch)
Date: Fri Aug 07 1998 - 01:32:14 MEST


I have seen problems with #define in ROOT mentioned before, but I am trying
to do really simple things:

root [0] #define tr ntp
Limitation: can not handle macro tr ntp; Use +P or -p option
 FILE:/tmp/21737aaa LINE:2
*** Interpreter error recovered ***
root [1] TFile *ff= new TFile("c6d-all-sm.root");
root [2] TNtuple *ntp = (TNtuple*) ff->Get("ntuple");
root [3] #define tr ntp
root [4] tr->Draw("LC:Xnm")
Error: non class,struct,union object tr used with . or -> FILE:/tmp/21737eaa
LINE:1
*** Interpreter error recovered ***

root [5] .g
[...]
0x85a0198  TNtuple* ntp=0x85a5560
0x85a01c0  #define tr=140137824

Giving "-p" option to root does not work. Is this kind of #define just not
implemented or is it some deeper problem ?

Another examples:

root [7] #define asde(x) (2*x-13/x)
root [8] asde(12)
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetstream():2 FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option
Error: Unexpected EOF G__fgetc() FILE:/tmp/21737gaa LINE:1
Advice: You may need to use +P or -p option


Another one:

root [0] #define asde(x) (2*x-13/x)
root [1] printf("%d\n",asde(12));
Warning: sde(12) Missing ';' FILE:tmpfile LINE:4
Error: No symbol ) in current scope  FILE:tmpfile LINE:4
*** Interpreter error recovered ***

Regards,
--
Tomasz Motylewski



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:35 MET