public int getOutputVariableIndex(final String name, final boolean mustExist) {
        final int idx = getVariableIdx(name, false);
        if (idx < 0) {
            if (mustExist) {
                throw new IllegalArgumentException("unknown variable: " + name);
            }
        } else if (idx < minWriteIdx) {
            throw new IllegalArgumentException("bad access to global variable: " + name);
        }
        for (int i = 0; i < nBuildInVars; i++) {
            if (buildInVariableIdx[i] == idx) {
                return i;
            }
        }
        final int[] extended = new int[nBuildInVars + 1];
        System.arraycopy(buildInVariableIdx, 0, extended, 0, nBuildInVars);
        extended[nBuildInVars] = idx;
        buildInVariableIdx = extended;
        return nBuildInVars++;
    }
add a new lookup-value for the given name to the given lookupData array.
If no array is given (null value passed), the value is added to
the context-binded array. In that case, unknown names and values are
created dynamically.

@return a newly created value element, if any, to optionally add aliases
main/src/main/java/cgeo/geocaching/brouter/expressions/BExpressionContext.java