예제 #1
0
 public string GetValue(VariableTable table)
 {
     if (comboBox1.SelectedIndex == 0)
     {
         return(textBox1.Text);
     }
     else
     {
         return(table.Contains(textBox1.Text) ? table[textBox1.Text].Value.ToString() : null);
     }
 }
예제 #2
0
 public override void Execute(VariableTable table)
 {
     base.Execute(table);
     if (Variable == null)
     {
         throw new VariableException("변수가 비어있습니다.");
     }
     if (table.Contains(Variable))
     {
         throw new VariableException("이미 같은 이름의 변수가 정의되어 있습니다.");
     }
     table.Add(Variable);
     Next = _linked[0];
 }
 public override void Execute(VariableTable table)
 {
     base.Execute(table);
     if (string.IsNullOrEmpty(Name))
     {
         throw new VariableException("변수가 비어있습니다.");
     }
     if (!table.Contains(Name))
     {
         throw new VariableException("변수가 정의되어 있지 않습니다.");
     }
     table[Name].Value = Delegate(table[Name].Value, RValue(table));
     Next = _linked[0];
 }