Beispiel #1
0
        public System.String Declare(System.String VariableName)
        {
            Variable varia = new Disp.Internal.Variable(VariableName);

            if (!this.Ambiente.VariableExists(varia))
            {
                this.Ambiente.AddVariable(varia);
            }

            return("");
        }
Beispiel #2
0
        public System.String Set(System.String VariableName, String Value)
        {
            Variable varia = new Disp.Internal.Variable(VariableName);

            varia.value = Value;

            if (!this.Ambiente.VariableExists(varia))
            {
                this.Ambiente.AddVariable(varia);
            }

            return("");
        }
Beispiel #3
0
        public System.String SetMath(System.String VariableName, String Value)
        {
            Variable varia = new Disp.Internal.Variable(VariableName);

            NCalc.Expression e = new NCalc.Expression(Value);
            varia.value = e.Evaluate().ToString();

            if (!this.Ambiente.VariableExists(varia))
            {
                this.Ambiente.AddVariable(varia);
            }

            return("");
        }
Beispiel #4
0
        public String Read(System.String VariableName)
        {
            Variable varia = new Disp.Internal.Variable(VariableName);

            varia.value = Console.Read();
            if (!this.Ambiente.VariableExists(varia))
            {
                this.Ambiente.AddVariable(varia);
            }
            else
            {
                this.Ambiente.SetVariableValue(varia);
            }

            return(String.Empty);
        }