public interface Function
Within an expression, a reference to a function is created if the parser
encounters a name followed by an argument list and the name can be resolved
through the parser's current namespace.
The resulting term in this case is an instance of .Term.Call
| Modifier and Type | Method and Description |
|---|---|
boolean |
evalB(EvalEnv env,
Term[] args)
Evaluates this function to a
double value. |
double |
evalD(EvalEnv env,
Term[] args)
Evaluates this function to a
double value. |
int |
evalI(EvalEnv env,
Term[] args)
Evaluates this function to an
int value. |
int |
getArgType(int argIndex)
Gets the type of a function's i-th argument.
|
String |
getName()
Gets the function's name.
|
int |
getNumArgs()
Gets the function's number of arguments.
|
int |
getRetType()
Gets the function's return type.
|
String getName()
null.int getRetType()
TYPE_X constants
defined in the Term class.int getNumArgs()
int getArgType(int argIndex)
argIndex - The argument index.TYPE_X constants defined in the Term class.boolean evalB(EvalEnv env, Term[] args) throws EvalException
double value.env - the application dependant environment.args - the (un-evaluated) arguments passed to the functiondouble valueEvalException - if the evaluation failsint evalI(EvalEnv env, Term[] args) throws EvalException
int value.env - the application dependant environment.args - the (un-evaluated) arguments passed to the functionint valueEvalException - if the evaluation failsdouble evalD(EvalEnv env, Term[] args) throws EvalException
double value.env - the application dependant environment.args - the (un-evaluated) arguments passed to the functiondouble valueEvalException - if the evaluation failsCopyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.