A Sandcastle Documented Class Library
InputInterpreter Class
NamespacescsmicInputInterpreter
CS-MIC - C# Math Input Control
An interpreter object that reads user input and evaluates the code.
Declaration Syntax
C#Visual BasicVisual C++J#JavaScript
public class InputInterpreter
Public Class InputInterpreter
public ref class InputInterpreter
public class InputInterpreter
csmic.InputInterpreter = function();

Type.createClass(
	'csmic.InputInterpreter');
Members
All MembersConstructorsMethodsPropertiesFields



IconMemberDescription
InputInterpreter()()()
Creates a new InputInterpreter.

InputInterpreter(InputInterpreter)
Creates a new InputInterpreter from an original.

Assign(String, Decimal)
Assigns a decimal value to a variable.

Assign(String, String)
Assigns a decimal value to a variable.

Assign(String, array<Decimal>[]()[])
Assigns a decimal value to a variable.

Binary
Gets the value (cast as a long) converted to its binary equivalent.

CodedFunctions
Gets or sets a list of coded functions that the interpreter supports.

ComputeExpression(String)
Computes an expression and returns the result as a decimal.

Decimal
Gets the value of the output as a decimal.

Double
Gets the value of the output cast as a double.

ExecuteFunction(String, array<Decimal>[]()[])
Executes a function stored in the interpreter.

Float
Gets the value of the output cast as a float.

Int
Gets the value of the output cast as an int.

Interpret(String)
Interprets and executes given input.

InterpretedFunctions
Gets or sets a list of user generated interpreted functions that the interpreter supports.

LastExecutionTime
Gets the execution time of the last calculation.

Message
Gets the verbose message that is generated with a calculation.

Output
Gets the message that represents the InputInterpreters output.

ProduceOutput(Object)
Produces output given a single object.

variables
The variables assigned.

Remarks
The interpreter does not support exceptions by design. Instead, invalid calculations, parameters, etc. will result in a result of zero.
CopyC#
InputInterpreter interpreter = new InputInterpreter();
interpreter.Interpret("1/0"); // The result will be 0, not an exception.
Inheritance Hierarchy
Object
InputInterpreter

Assembly: csmic (Module: csmic) Version: 1.0.0.0 (1.0.0.0)