An interpreter object that reads user input and evaluates the code.

Namespace: csmic
Assembly: csmic (in csmic.dll) Version: 1.1.3.0 (1.1.3.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class InputInterpreter
Public Class InputInterpreter
public ref class InputInterpreter

Members

               
 All Members  Constructors   Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
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, array<Decimal>[]()[][])
Assigns a decimal value to a variable.
Assign(String, String)
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.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
ExecuteFunction(String, array<Decimal>[]()[][])
Executes a function stored in the interpreter.
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Float
Gets the value of the output cast as a float.
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Int
Gets the value of the output cast as an int.
Interpret(String)
Interprets and executes given input.
InterpretAsync(String, Action<(Of <<'(InputInterpreter>)>>))
Interpret an input asynchronously.
InterpretedFunctions
Gets or sets a list of user generated interpreted functions that the interpreter supports.
LastExecutionTime
Gets the execution time of the last calculation.
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
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.
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
variables
The variables assigned.
Variables
Gets the variables.

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

System..::..Object
  csmic..::..InputInterpreter

See Also