示例#1
0
        protected override Completion ExecuteImpl(ExecutionEnvironment enviroment)
        {
            if (Length1 == null || Length2 == null)
            {
                return(Completion.Exception(Language.NullException, this));
            }
            Completion c = Length1.Execute(enviroment);

            if (!c.IsValue)
            {
                return(c);
            }
            if (!(c.ReturnValue is int))
            {
                return(Completion.Exception(Language.NotNumberException, Length1));
            }
            Completion l = Length2.Execute(enviroment);

            if (!l.IsValue)
            {
                return(l);
            }
            if (!(l.ReturnValue is int))
            {
                return(Completion.Exception(Language.NotNumberException, Length2));
            }
            return(new Completion(new object[(int)c.ReturnValue, (int)l.ReturnValue]));
        }