예제 #1
0
        public override void execute(Interpret interpreter)
        {
            NumericVariable v       = interpreter.getNumVariable(varIndex.eval(interpreter));
            int             listInd = interpreter.getNumVariable(listIndex.eval(interpreter)).getValue();
            var             list    = interpreter.getList(listInd);
            int             counter = 0;
            int             index   = 0;

            while (index < list.Count)
            {
                v.assign(list[index].getValue());
                directive.executeAll(interpreter);
                index++;
                counter++;
                if (counter > LoopLimit)
                {
                    break;
                }
            }
        }
예제 #2
0
        public void assign(int value, Interpret interpreter)
        {
            NumericVariable var = interpreter.getNumVariable(variableIndex);

            var.assign(value);
        }