Esempio n. 1
0
        public static void UndefineConstant(string name)
        {
            if (!IsConstant(name))
            {
                throw new Water.Error("Constant \"" + name + "\" is not defined.");
            }

            _constants.Remove(name);
        }
Esempio n. 2
0
        public static void DefineVariable(string name, object value)
        {
            if (IsConstant(name))
            {
                throw new Water.Error("Constant \"" + name + "\" is already defined.");
            }

            Water.Dictionary frame = (Water.Dictionary)_variables[_stackDepth - 1];
            if (frame.IsDefined(name))
            {
                frame.Remove(name);
            }
            frame.Add(name, value);
        }