RunEvalLoop() public méthode

public RunEvalLoop ( ) : void
Résultat void
Exemple #1
0
      public static void Main(String[] args)
      {
         Program theprogram = new Program();

         //first demonstrate visiting premade line.
         theprogram.VisitLine("myvariable = 1 + 2; var = myvariable + 3; print var;");
         theprogram.RunEvalLoop();
      }
Exemple #2
0
 public static void Main(String[] args)
 {
    Program theprogram = new Program();
    //String value = Console.ReadLine();
    //theprogram.VisitLine(value);
    //first demonstrate visiting premade line.
    theprogram.VisitLine("myvariable=2*3;var =myvariable+ 2;Struct simple{ int a;}; simple s; s.a=value; print var;");
    //theprogram.VisitLine("M=(3)(2)[1,1,1,1,1,1];N=(2)(3)[2,1,1,1,1,1];var = 3+2; Z=M*N; print var;");
    theprogram.RunEvalLoop();
 }
Exemple #3
0
 private void button3_Click(object sender, EventArgs e)
 {
     theprogram = new Program();
     if(progcon!=null)
     theprogram.RunEvalLoop(progcon);
     Thread.Sleep(1000);
     textBox3.Text = theprogram.resultMessage;
     theprogram.resultMessage = "";
     progcon = "";
 }