Search in sources :

Example 11 with VariableReference

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

the class Operator method unaryPreDivide.

// pre divide
public static Double unaryPreDivide(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 12 with VariableReference

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

the class Operator method unaryPrePlus.

// pre plus
public static Double unaryPrePlus(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 13 with VariableReference

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

the class Operator method unaryPoPl.

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

Example 14 with VariableReference

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

the class Operator method unaryPoMi.

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

Example 15 with VariableReference

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

the class Operator method unaryPostMinus.

// post minus
public static Double unaryPostMinus(PageContext pc, Collection.Key[] keys, double value) throws PageException {
    VariableReference ref = VariableInterpreter.getVariableReference(pc, keys, true);
    double rtn = Caster.toDoubleValue(ref.get(pc));
    ref.set(rtn - value);
    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