Search in sources :

Example 16 with VariableReference

use of lucee.runtime.type.ref.VariableReference in project Lucee by lucee.

the class Operator method unaryPreMinus.

// pre minus
public static Double unaryPreMinus(PageContext pc, Collection.Key[] keys, double value) throws PageException {
    VariableReference ref = VariableInterpreter.getVariableReference(pc, keys, true);
    double rtn = Caster.toDoubleValue(ref.get(pc)) - value;
    ref.set(rtn);
    return rtn;
}
Also used : VariableReference(lucee.runtime.type.ref.VariableReference)

Example 17 with VariableReference

use of lucee.runtime.type.ref.VariableReference in project Lucee by lucee.

the class Operator method unaryPreConcat.

// Concat
public static String unaryPreConcat(PageContext pc, Collection.Key[] keys, String value) throws PageException {
    VariableReference ref = VariableInterpreter.getVariableReference(pc, keys, true);
    String rtn = Caster.toString(ref.get(pc)).concat(value);
    ref.set(pc, rtn);
    return rtn;
}
Also used : VariableReference(lucee.runtime.type.ref.VariableReference)

Aggregations

VariableReference (lucee.runtime.type.ref.VariableReference)17 Collection (lucee.runtime.type.Collection)2 ParserString (lucee.commons.lang.ParserString)1 StringList (lucee.commons.lang.StringList)1 PageContextImpl (lucee.runtime.PageContextImpl)1 ExpressionException (lucee.runtime.exp.ExpressionException)1 Query (lucee.runtime.type.Query)1 Scope (lucee.runtime.type.scope.Scope)1 UndefinedImpl (lucee.runtime.type.scope.UndefinedImpl)1