00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using EmbeddedCh;
00005
00006 namespace Program1
00007 {
00008 class Program
00009 {
00010 static void Main(string[] args)
00011 {
00012 ChInterp interp = new ChInterp();
00013 String[] argv = { "embedch1.ch" };
00014
00015 Console.WriteLine("Embedded Ch in .NET test program.");
00016 Console.WriteLine("Using dll " + ChInterp.chdll);
00017
00018 Console.WriteLine("Starting Ch interpretter.");
00019 interp.Initialize();
00020
00021 Console.WriteLine("Running script.");
00022 interp.RunScript(argv);
00023
00024 Console.WriteLine("Press any key to run the next script.");
00025 Console.ReadKey();
00026 interp.AppendRunScriptFile("embedch2.ch");
00027 interp.AppendRunScript("i++;");
00028 interp.AppendRunScriptFile("embedch2.ch");
00029
00030 Console.WriteLine("Ending interpretter.");
00031 interp.End();
00032
00033 Console.WriteLine("Press any key to end the program.");
00034 Console.ReadKey();
00035 }
00036 }
00037 }