Computation using RegEx

Parent Previous

VisualSim                                                                                                                                    

Computation using RegEx

The RegEx can be used in parameter fields to compute the value at the start of the simulation based on other parameters. The RegEx can also be used in the FSM for the actions.  In the Virtual Machine, Smart Controller, Processor and Decision blocks, the RegEx can be used in the methods and on the Right Hand Side (RHS) of an equation. The equation can have any number of operators and variables and combine Data Structure Fields, Memories, Values and Parameters. A complex expression can combine the built-in functions in any order, as far as they confirm to the data types. The Left Hand Side of the equation can only be a Field or Memory.  There are two types of formats:

Scalar and String Data types- Integer, Double and Long

X = Y + Z

Boolean

X = (Boolean function)?Value1:Value2

where X is assigned the value1 or value 2 depending on the function resolving to true and false respectively. Value1 and Value2 can be any expression containing Memories, Fields, Parameters and Values.

Arrays

  1. Array(i) = Array(j) - Y + Z where Y and Z can reference a Array location, parameters, memories and values. The data types can be scalar, Boolean or string data types. The indices i and j, must be an integer type and can be a value, memory, parameter or field.
  2. Array(i)(j) = Array(i)(j) + Y + Z. This is definition for a multi-dimension array. The indices i and j, must be integer and can be a value, memory, parameter or field.



 

Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation