Package org.yinwang.yin.value

Examples of org.yinwang.yin.value.Vector


    }


    @Override
    public Value interp(Scope s) {
        return new Vector(interpList(elements, s));
    }
View Full Code Here


    }


    @Override
    public Value typecheck(Scope s) {
        return new Vector(typecheckList(elements, s));
    }
View Full Code Here

        if (!(indexValue instanceof IntValue)) {
            Util.abort(value, "subscript " + index + " is not an integer: " + indexValue);
        }

        Vector vector1 = (Vector) vector;
        int i = ((IntValue) indexValue).value;

        if (i >= 0 && i < vector1.size()) {
            vector1.set(i, v);
        } else {
            Util.abort(this, "subscript out of bound: " + i + " v.s. [0, " + (vector1.size() - 1) + "]");
        }
    }
View Full Code Here

TOP

Related Classes of org.yinwang.yin.value.Vector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.