// #code;

new boolean[3][3];

edef b = new boolean[][3];
b[0] = new boolean[2];
b;
b[1] = new boolean[4];
b;
b[1][3];
b[2][0];
b[0][3];

edef Set (m : int[][][][]) =
let i; j; k; l; in 
   while i < m.size do
     { j = 0;
       while j < m[i].size do
         { k = 0;
           while k < m[i][j].size do
             { l = 0;
               while l < m[i][j][k].size do
                 { m[i][j][k][l] = i+j+k+l;
                   l = l+1;
                 };
               k = k+1;
             };
           j = j+1;
         };
       i = i+1;
     };

edef see (m : int[][][][]) =
let i; j; k; l; in 
   while i < m.size do
     { j = 0;
       while j < m[i].size do
         { k = 0;
           while k < m[i][j].size do
             { l = 0;
               while l < m[i][j][k].size do
                 { write(" "+m[i][j][k][l]+"");
                   l = l+1;
                 };
               write("\t");
               k = k+1;
             };
           write("\n");
           j = j+1;
         };
       write("\n\n");
       i = i+1;
     };

edef a = new int[2][2][2][2];

Set(a);
see(a);

//  def map (m : int[][],f,g) = let i = 0; j;
//                    in while i < m.size do
//                       { j = 0;
//                         while j < m[i].size do
//                           { f(m,i,j);
//                             j = j+1;
//                           };
//                         g();
//                         i = i+1;
//                       };

//  def Set (m : int[][],i,j) = m[i][j] = i+j;
//  def prt (m : int[][],i,j) = write(" "+m[i][j]);

//  let a = new int[5][10];
//  in {
//       map(a,Set,function(){});
//     map(a,prt,function(){ write("\n"); });
//     };

edef intset = 4 + 8 + 9 + 17 + 12 + new {};
edef ia = new <int,real>[intset];

ia[2];
ia[4] = <2,3.4>;
ia;

edef strset = "toto" + "titi" + "tata" + new {};
edef sa = new real[strset][4..8];
sa;

sa["titi"][5] = 3.14;
sa;
sa["tata"];
sa["titi"];

edef prset = <1,2.3> + <4,5.6> + new {};
edef pa = new string[prset];
pa;

pa[<4,5.6>] = "hello";
pa[<1,2.3>] = "good bye";
pa;
pa[<1,2.3>];
pa[<4,5.6>];
pa[<1,5.6>];
