using System;
-using M17N.Core;
-public class Test
+namespace M17N
{
- public static void Main()
+ public static class M17n
{
- MSymbol sym1, sym2;
+ public const int Version = 0x020101;
- sym1 = new MSymbol ("abc");
- Console.WriteLine (sym1.ToString ());
- sym2 = new MSymbol ("abc");
- Console.WriteLine (sym2.ToString ());
- Console.WriteLine (sym1 == sym2 ? "OK" : "NO");
- sym1.put (MSymbol.nil, MSymbol.t);
+ public static int MajorVersion { get { return (Version >> 16); } }
+ public static int MinorVersion { get { return ((Version >> 8) & 0xFF); } }
+ public static int ReleaseNumber { get { return (Version & 0xFF); } }
- MPlist p = new MPlist ();
+ public static bool debug = false;
- p.put (MSymbol.t, sym1);
- p.push (MSymbol.t, sym2);
-
- MPlist pp = new MPlist ();
- pp.put (MSymbol.t, p);
- Console.WriteLine (pp.ToString ());
- Console.WriteLine (p.get (MSymbol.t));
+ public static void DebugPrint (string fmt, params object[] arg)
+ {
+ if (debug)
+ Console.Write (fmt, arg);
+ }
}
}