Пример #1
0
        public override void Execute(params string[] args)
        {
            string name  = args[1];
            string op    = args[2];
            string value = args[3];

            if (op != "=")
            {
                CommandResult.AddErrorMessage("Error: Must use '=' to set value.");
                return;
            }

            if (VariableManager.Contains(name))
            {
                VariableManager.Set(name, value);
            }
            else
            {
                Variable nv = new Variable();
                nv.Name        = name;
                nv.Environment = false;
                VariableManager.GetType(nv, value);
                VariableManager.Add(nv);
            }
        }