public void Setup(BasicInterpreter interpreter) { this.interpreter = interpreter; }
static void Main(string[] args) { string program = @" 10 LET X = 1 20 LET Y = 1000 30 FOR I FROM 1 TO Y 35 PRINT {I} 40 MUL X I 50 NEXT 60 PRINT Factorial is {X} 60 PRINT Y is {Y} "; var basic = new BasicInterpreter(program); basic.Compile(); basic.Run(); Console.ReadKey(); }