Пример #1
0
 private void writeScalar(HVal val)
 {
     if (val == null)
     {
         p('N');
     }
     else if (val is HBin)
     {
         writeBin((HBin)val);
     }
     else if (val is HXStr)
     {
         writeXStr((HXStr)val);
     }
     else
     {
         p(val.toZinc());
     }
     flush();
 }
Пример #2
0
 private void writeRow(HGrid grid, HRow row)
 {
     for (int i = 0; i < grid.numCols; ++i)
     {
         HVal val = row.get(grid.col(i), false);
         if (i > 0)
         {
             m_swOut.Write(',');
         }
         if (val == null)
         {
             if (i == 0)
             {
                 m_swOut.Write('N');
             }
         }
         else
         {
             m_swOut.Write(val.toZinc());
         }
     }
     flush();
 }
Пример #3
0
 protected void verifyZinc(HVal val, string s)
 {
     Assert.AreEqual(val.toZinc(), s);
     Assert.IsTrue(read(s).hequals(val));
 }