Index: trunk/SophyaLib/Manual/modifs.tex
===================================================================
--- trunk/SophyaLib/Manual/modifs.tex	(revision 4060)
+++ trunk/SophyaLib/Manual/modifs.tex	(revision 4065)
@@ -152,4 +152,13 @@
 \titre{SysTools}
 \begin{itemize}
+\item[\rond] Avril 2012: Introduction de la classe {\tt  CE\_VarListInterface}  et modification
+de la classe {\tt CExpressionEvaluator} afin de permettre la gestion des variables pour l'valuation des
+expressions (cexpre.h .cc). La classe {\tt Commander} a t modifi aussi avec 
+l'introduction de la classe {\tt Cmd\_CE\_VarList} pour permettre l'valuation des 
+expressions numriques contenant des noms de variables d'interprteur, sans l'utilisation 
+de l'oprateur d'valuation {\bf \$}. Les commandes internes {\bf varcexpon,  varcexpoff}
+de l'interprteur permettent de contrler l'activation ou la dsactivation de cette fonctionalit.
+Le programme test {\tt tcmd.cc} a t modifi et amliore.
+%%
 \item[\rond] Septembre 2011:  Corrections dans commander.cc  des bugs de {\bf forinfile} et dans la gestion des 
 boucles imbriques (bugs trouvs par JEC en Mai 2011). Diffrentiation instruction break et breakall, pour 
@@ -158,5 +167,5 @@
 \end{itemize}
 
-\titre{BaseTools}
+\titre{PI}
 \begin{itemize}
 \item[\rond]  Avril 2012: correction de protection de limites de trac dans ucckprot.h   
Index: trunk/SophyaLib/Manual/piapp.tex
===================================================================
--- trunk/SophyaLib/Manual/piapp.tex	(revision 4060)
+++ trunk/SophyaLib/Manual/piapp.tex	(revision 4065)
@@ -72,6 +72,6 @@
 \vspace{1cm}
 \begin{center}
-{\bf \Large piapp Version: 4.3 (V\_Sep2007) } \\
-{\bf SOPHYA version=4.2 , PI version= 4.2 }
+{\bf \Large piapp Version: 4.35 (V\_Avr2012) } \\
+{\bf SOPHYA version=2.230 , PI version= 4.25 }
 \end{center}
 \titrebp{5}
@@ -1575,5 +1575,5 @@
 \item[\rond] Instruction {\bf echo2file} to write (append) the line to file ({\tt echo2file filename ....})
 \item[\rond] Instruction {\bf sleep nsec} wait for {\tt nsec}  seconds
-\item[\rond] Instructions {\bf timingon , timingoff , traceon , traceoff } \\
+\item[\rond] Instructions {\bf timingon, timingoff, traceon, traceoff, varcexpon, varcexpoff} \\
 %
 \item[\rond] {\bf exec filename [arg1 arg2 ... ] } to execute command from 
Index: trunk/SophyaLib/Manual/sophya.tex
===================================================================
--- trunk/SophyaLib/Manual/sophya.tex	(revision 4060)
+++ trunk/SophyaLib/Manual/sophya.tex	(revision 4065)
@@ -20,5 +20,5 @@
 \usepackage[ps2pdf,bookmarks,bookmarksnumbered,%
               urlcolor=blue,citecolor=blue,linkcolor=blue,%
-                pagecolor=blue,%hyperindex,%
+                pagecolor=blue, % hyperindex, %
                  colorlinks=true,hyperfigures=true,hyperindex=true
            ]{hyperref}
@@ -49,5 +49,5 @@
 \vspace{1cm}
 \begin{center}
-{\bf \Large SOPHYA Version: 2.2 (V\_Sep2010) }
+{\bf \Large SOPHYA Version: 2.230 (V\_Avr2012) }
 \end{center}
 \titrebp{1}
@@ -234,5 +234,5 @@
 \item[] {\bf AnaLC} contains program files extracted from the EROS/PEIDA software
 and adapted to be compiled with SOPHYA. It can be used in particular to read and analyse
-EROS light curve data files (fichiers de suivi). 
+EROS light curve data files (fichiers de suivi). Check the README file in AnaLC directory.
 \item[] {\bf LUC}  ( {\bf L}ittle {\bf U}niverse {\bf C}alculator) is a module containing classes to 
 perform basic computation related to the universe geometry (FRW metric).
@@ -295,5 +295,6 @@
 In order to use the shared libraries, the {\bf LD\_LIBRARY\_PATH} variable
 should contain the Sophya shared library path 
-({\tt \$SOPHYABASE/slb}). 
+({\tt \$SOPHYABASE/slb}). On Mac OSX, the environment variable {\bf DYLD\_LIBRARY\_PATH}
+is used instead of LD\_LIBRARY\_PATH. 
 On Silicon Graphics machines with IRIX64 operating system, 
 the default SOPHYA configuration correspond to the 64 bit architecture. 
@@ -951,4 +952,99 @@
 \end{enumerate}
 
+ \subsection{Prime and rational numbers}
+\index{PrimeNumbers} \index{QNumber}  \label{primeqnumb}
+The library provides basic computation possibilities for prime and rational numbers 
+through the  {\bf PrimeNumbers} and {\bf QNumber} classes. Check the header file 
+{\tt pqnumber.h} to see the provided functionalities.  
+The class {\bf PrimeNumbers} can be used to perform basic computation with 
+prime numbers. Integer numbers are represented by machine size long integer (8 bytes). 
+The class is thread safe, whith basic algorithms to find prime numbers or perform 
+decomposition to prime factors. It has been mainly designed to 
+enable computation with rational numbers. 
+\begin{verbatim}  
+// Create a PrimeNumbers object 
+PrimeNumbers primes;
+// Print the prime numbers from rank 20 to 25 ...
+cout << " Primes[20...30]: " ; 
+for(size_t k=19; k<30; k++) cout << primes(k) << "  "; 
+// Print all prime numbers less than some max values
+uint_8 p = primes.Next();  uint_8 pmax = 223;
+cout << endl << " Primes < " << pmax << " : " << endl;
+while (p<pmax) {
+ cout << p << "  ";
+ p = primes.Next();
+}
+cout << endl; 
+// Compute and print prime factor decomposition:
+uint_8 nombre=247890;
+vector<uint_8> pfac=primes.PrimeFactors(nombre, true);
+cout << " PrimeFactors[" << nombre << "]: "; 
+for(size_t i=0; i<pfac.size(); i++) cout << pfac[i] << "   ";   
+cout << endl; 
+\end{verbatim}
+
+The class {\bf QNumber} can be used to represent and perform computation on rational 
+numbers. The four basic arithmetic operations (addition $+$, subtraction $-$, multiplication $\times$ 
+division $/$) are defined, as well as comparison operators ($==  , != , < , > , \leq , \geq $).    
+The QNumber class does not inherit from AnyDataObj, but can be serialized to/from PPF streams 
+as a pair of long integers. 
+\begin{verbatim}  
+// Create rational numbers from pairs of integers
+QNumber q1(3,4), q2(5,6), q3(6,8);
+// Operations and comparsion
+QNumber q4 = q1+q2; 
+cout << q1 << " + " << q2 << " = " << q4 << endl;
+QNumber qa(q1), qb(q2);
+cout << " Test qa==qb : -> " << qa << " ?== " << qb;
+if (qa == qb)  cout << " -> true " << endl;
+else cout << " -> false " << endl;
+qb = q3;
+cout << " Test qa==qb : -> " << qa << " ?== " << qb;
+if (qa == qb)  cout << " -> true " << endl;
+else cout << " -> false " << endl;
+QNumber qq(3*7*17*5,(-5)*7*11*2);
+cout << " qq= " << qq << "  qq.Simplify() = " << qq.Simplify() << endl;
+\end{verbatim}
+
+\subsection{Physical units and constants}
+\index{Units} \index{PhysQty}  \label{physunits}
+\begin{figure}[hbt]
+\dclsbb{AnyDataObj}{Units}
+\dclsbb{AnyDataObj}{PhysQty}
+\end{figure}
+The {\bf Units} class is used to represent physical quantities in terms of the SI system base 
+quantities: length, mass, time, electrical current, thermodynamic temperature, amount of substance 
+and luminous intensity. Check the BIPM 
+\href{http://www.bipm.org/fr/si/}{http://www.bipm.org/fr/si/}
+ or NIST \href{http://physics.nist.gov/cuu/Units/}{http://physics.nist.gov/cuu/Units/}  
+web sites for detailed information on the SI system and units. Basic usage of this class 
+consist of calling static methods which return usual units. New units can be constructed using the 
+product and divide operators (*,/) or the {\tt power} method. The Unit class has a PPF handler and 
+can be serialized to or from PPF streams. 
+\begin{verbatim}  
+Units w=Units::watt(); 
+cout << " Power unit (watt) : " << w.Name() << " (" << w << ")" << endl; 
+// define the speed SI unit (m/s) : 
+Units mos = Units::meter()/Units::second() ;
+cout << " SI speed unit : " << mos << "  -> "; mos.Print() ;  
+// mutiple of an existing unit :
+Units mw=Units::watt().mega(); 
+cout << " Megawatt: " << mw.Name() << " (" << mw << ")  -> "; mw.Print() ; 
+\end{verbatim}
+
+This class represents physical quantities and constants, corresponding to a value associated 
+with a unit. A relative precision and a name are optionally associated with the object. Most 
+physical constants and usual quantities can  be obtained as PhysQty objects through static methods.
+The PhysQty class has a PPF handler and can be serialized to or from PPF streams. 
+\begin{verbatim}  
+cout <<  " k_Boltzmann: " << PhysQty::k() << endl;
+cout <<  " m_e: " << PhysQty::electron_mass() << endl;
+// Conversion of a quantity to a different unit 
+PhysQty aj(Units::joule(), 25.); 
+PhysQty aev=aj.ConvertTo(Units::electronvolt().giga());
+cout <<  " A : " << aj << " -> " << aev << endl;
+\end{verbatim}
+
+
 %%%%%%%%%%%%
 \newpage
@@ -3223,5 +3319,21 @@
 csh> tmtdt SWFITS 50000 1
 \end{verbatim}
-
+\item {\bf tcmd } tests the command interpreter and expression evaluator classes 
+(Commander, CExpressionEvaluator, RPNExpressionEvaluator) and the Timer class 
+ \begin{verbatim}
+csh> tcmd cexptst
+ ===> OK if RC=0 
+csh> tcmd cexptv
+ ===> OK if RC=0   
+csh> tcmd cexptvp
+ ===> OK if RC=0   
+csh> tcmd rpntst
+ ===> OK if RC=0   
+csh> tcmd timer
+ ===> Check output 
+csh> tcmd commander
+ ===> Interactive Commander class test 
+\end{verbatim}
+  
 \end{enumerate}
 
@@ -3232,5 +3344,5 @@
 SOPHYA library defines a set of exceptions which are used 
 for signalling error conditions. From version V2.2 , all SOPHYA exceptions inherit from 
-the standard C++ exception class ( {\bf std::std::exception}). The method {\tt const char* what()} is 
+the standard C++ exception class ( {\bf std::exception}). The method {\tt const char* what()} is 
 thus implemented and returns the corresponding error message.
 The figure below shows a partial class diagram for exception classes in SOPHYA.
@@ -3262,4 +3374,5 @@
 \addcontentsline{toc}{section}{Index}
 \printindex 
+
 \end{document}
  
