// execute the selection line. If substitute is true, replace selection with $VV public void ExecuteSelectionLine(bool substitute) { int lineNo = GetLineFromCharIndex(SelectionStart); string line = Lines[lineNo]; if (substitute && SelectionLength > 0) { int lineStartIndex = GetFirstCharIndexFromLine(lineNo); line = line.Substring(0, SelectionStart - lineStartIndex) + "$VV" + line.Substring(SelectionStart + SelectionLength - lineStartIndex); RunCsi.interp.SetValue("VV", float.Parse(SelectedText)); Console.WriteLine(".>. " + line); } parent.quiet = true; RunCsi.interp.ProcessLine(GuiConsoleForm.CleanLine(line)); // parent.DelayedExecute(line); }