Class RuntimeArithmetic
java.lang.Object
io.github.protasm.jvmud.compiler.runtime.RuntimeArithmetic
Runtime arithmetic helpers for dynamically typed LPC expressions.
-
Method Summary
-
Method Details
-
add
Adds two dynamic LPC values.LPC mudlibs often combine values returned from object calls before the compiler can know whether they are numbers or strings. JVMud preserves that late choice here: numeric pairs add numerically, while either text operand produces string concatenation.
-
subtract
Subtracts two dynamic LPC values.Runtime strings and arrays use LPC's difference operators. Numeric pairs subtract numerically. Other pairs are rejected so incompatible dynamic values fail loudly instead of being silently coerced into unrelated behavior.
-