Index: trunk/SophyaProg/Tests/Makefile
===================================================================
--- trunk/SophyaProg/Tests/Makefile	(revision 937)
+++ trunk/SophyaProg/Tests/Makefile	(revision 945)
@@ -15,5 +15,5 @@
 LIBF =  $(SLB)libsophya.so 
 #LIBS = -L$(SLB) -lPI -lsophya -lm 
-LIBS = -L$(SLB) -lextsophya -lsophya -lm 
+LIBS = -L$(SLB) -lPI -lextsophya -lsophya -lm 
 ifeq ($(MACHEROS),Linux)
 LIBS := $(LIBS) -ldl
Index: trunk/SophyaProg/Tests/tstndblk.cc
===================================================================
--- trunk/SophyaProg/Tests/tstndblk.cc	(revision 937)
+++ trunk/SophyaProg/Tests/tstndblk.cc	(revision 945)
@@ -5,15 +5,41 @@
 #include <string.h>
 #include <math.h>
+#include <complex>
+#include <unistd.h>
 #include "ntoolsinit.h"
 #include "pexceptions.h"
 #include "ndatablock.h"
 
-////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
 int main(int narg,char *arg[])
 {
+//-- Decodage arguments
+int lp = 0;
+char c;
+while((c = getopt(narg,arg,"hd:")) != -1) {
+  switch (c) {
+  case 'd' :
+    sscanf(optarg,"%d",&lp);
+    break;
+  case 'h' :
+    cout<<"tstndblk [-h] [-d debug_level]"<<endl;
+    exit(-1);
+  }
+}
+
+//-- Initialization
 SophyaInit();
-float x1[5] = {1.,2.,3.,4.,5.};
-float x2[5] = {10.,20.,30.,40.,50.};
-float x3[5] = {100.,200.,300.,400.,500.};
+const int NDim = 8;
+float *x1 = new float[NDim];
+float *x2 = new float[NDim];
+float *x3 = new float[NDim];
+for(int k=0;k<NDim;k++)
+  {x1[k]=k+1; x2[k]=(k+1)*10; x3[k]=(k+1)*100;}
+
+NDataBlock<int_4>::SetPrintDebug(lp);
+NDataBlock<r_4>::SetPrintDebug(lp);
+NDataBlock<r_8>::SetPrintDebug(lp);
+NDataBlock< complex<r_4> >::SetPrintDebug(lp);
+NDataBlock< complex<r_8> >::SetPrintDebug(lp);
 
 {  // Pour voir explicitement le travail du destructeur
@@ -32,22 +58,22 @@
 cout<<endl<<"Createur A1(3)"<<endl;
 NDataBlock<float> A1(3);
-cout<<endl<<"Createur B1(5)"<<endl;
-NDataBlock<float> B1(5);
-A1.FillFrom(5,x1); A1.Print(0,999);
-B1.FillFrom(5,x1); B1.Print(0,999);
+cout<<endl<<"Createur B1("<<NDim<<")"<<endl;
+NDataBlock<float> B1(NDim);
+A1.FillFrom(NDim,x1); A1.Print(0,999);
+B1.FillFrom(NDim,x1); B1.Print(0,999);
 
 cout<<endl<<"Createur A2(3)"<<endl;
 NDataBlock<float> A2(3);
-A2.FillFrom(5,x2); A2.Print(0,999);
-cout<<endl<<"Createur B2(5)"<<endl;
-NDataBlock<float> B2(5);
-B2.FillFrom(5,x2); B2.Print(0,999);
+A2.FillFrom(NDim,x2); A2.Print(0,999);
+cout<<endl<<"Createur B2("<<NDim<<")"<<endl;
+NDataBlock<float> B2(NDim);
+B2.FillFrom(NDim,x2); B2.Print(0,999);
 
 cout<<endl<<"Createur A3(3)"<<endl;
 NDataBlock<float> A3(3);
-A3.FillFrom(5,x3); A3.Print(0,999);
-cout<<endl<<"Createur B3(5)"<<endl;
-NDataBlock<float> B3(5);
-B3.FillFrom(5,x3); B3.Print(0,999);
+A3.FillFrom(NDim,x3); A3.Print(0,999);
+cout<<endl<<"Createur B3("<<NDim<<")"<<endl;
+NDataBlock<float> B3(NDim);
+B3.FillFrom(NDim,x3); B3.Print(0,999);
 
 //-----------------------------------------------------
@@ -61,10 +87,10 @@
 NDataBlock<float> BBB1(B1);}
 
-{cout<<endl<<"Createur avec bridge {Abr(5,x3,new Bridge)}"<<endl;
-NDataBlock<float> Abr(5,x3,new Bridge);
+{cout<<endl<<"Createur avec bridge {Abr("<<NDim<<",x3,new Bridge)}"<<endl;
+NDataBlock<float> Abr(NDim,x3,new Bridge);
 Abr.Print(0,999);
 cout<<"x3 existe encore: "<<x3[0]<<",...,"<<x3[4]<<endl;}
 
-{cout<<endl<<"Createur avec bridge {Abr(5,dum,NULL)}"<<endl;
+{cout<<endl<<"Createur avec bridge {Abr("<<NDim<<",dum,NULL)}"<<endl;
 float *dum = new float[10];
 for(int i=0;i<10;i++) dum[i] = 1000.+i;
@@ -152,4 +178,15 @@
 }  // Pour voir explicitement le travail du destructeur
 cout<<"Fin du Job"<<endl;
+cout<<"delete x1"<<endl; delete [] x1;
+cout<<"delete x2"<<endl; delete [] x2;
+cout<<"delete x3"<<endl; delete [] x3;
+
+//---- Final debug print
+cout<<endl<<endl<<"FINAL DEBUG SUMMARY : lp="<<lp<<endl<<endl;
+cout<<"DEBUG int_4:\n";        NDataBlock<int_4>::PrintDebug();
+cout<<"DEBUG r_4:\n";          NDataBlock<r_4>::PrintDebug();
+cout<<"DEBUG r_8:\n";          NDataBlock<r_8>::PrintDebug();
+cout<<"DEBUG complex<r_4>:\n"; NDataBlock< complex<r_4> >::PrintDebug();
+cout<<"DEBUG complex<r_8>:\n"; NDataBlock< complex<r_8> >::PrintDebug();
 
 exit(0);
