private void CodeExecutePrint(Print print) { object s = GenExpr(print.Expr); if (s != null) { inOutDevice.Print(s.ToString(), false); } else { inOutDevice.Print("null", false); } }
public void Run(string sourceCode) { try { if (_visibleInOutDevice) { _inOutDevice.Show(); _inOutDevice.LockForm(true); } Scanner scanner = new Scanner(sourceCode); Parser parser = new Parser(scanner.TokensList); CodeRun codeRun = new CodeRun(_inOutDevice, _functionLibrary, _symbolTable); codeRun.Run(parser.Result); if (_visibleInOutDevice) { _inOutDevice.LockForm(false); } } catch (Exception err) { if (!_visibleInOutDevice) { _inOutDevice.Show(); } _inOutDevice.LockForm(false); _inOutDevice.Print(err.Message); //throw err; // ?? } }