Beispiel #1
0
 static void Main(string[] args)
 {
     var p = new PSLVM();
     bool e = p.LoadString(
         "for (i = 1; i < arg; i += 1){" +
         "s = \"\";" +
         "if (i % 3 == 0) s += \"Fizz\";" +
         "if (i % 5 == 0) s += \"Buzz\";" +
         "if (!s) s = i;" +
         "print(s);" +
         "}"
         );
     Console.WriteLine(e);
     p.Run(new Variable(100));
     Console.ReadKey();
 }
Beispiel #2
0
 public Variable call(PSLVM vm, Variable arg)
 {
     return x.call(vm.getEnv(), arg);
 }