Hi Andre, I agree with you and will make the correction in the User's Guide. Thanks, Suzanne ----- Original Message ----- From: "Andre Holzner" <Andre.Holzner@cern.ch> To: "Root mailing list" <roottalk@pcroot.cern.ch>; <rootdoc@pcroot.cern.ch> Sent: Monday, January 29, 2001 10:26 AM Subject: small typo in user's guide ? Hi, I suspect a small typo in the Root User's Guide (V0.7) on page 246 (260 in the pdf) / paragraph 'the TObjArray collection' in the code box: for (int i = 0; i < fArr.GetLast(); i++) shouldn't it be i <= fArr.GetLast() ? At least according to the reference guide says: Int_t GetEntries() const Return the number of objects in array (i.e. number of non-empty slots). Attention: use this method ONLY if you want to know the number of non-empty slots. This function loops over the complete array and is therefore very slow when applied in a loop. Most of the time you better use GetLast()+1. and also I get a more correct behaviour using <= ...GetLast() trying to get the names of variables in an ntuple. best regards, André - ------------------+---------------------------------- Andre Holzner | +41 22 76 76750 Bureau 32 2-C13 | Building 32 CERN | Office 2-C13 CH-1211 Geneve 23 | http://wwweth.cern.ch/~holzner/
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:35 MET