Implementation

List of Source Modules

The following source modules have been utilized in the implementation of expressions.

      ExpressionManager.src implements the ExpressionManager.

      ExpressionEdit.src implements a widget for expression entry.

      Calculation.src, CalculationCmn.src, and CalculationCnf.src implement the Calculation tag; a simple wrapper for an expression.

Detail

The ExpressionManager is responsible for compiling and launching expression modules. It also implements several convenience methods for managing running expressions.

The module .src and .run files reside in the Expressions subdirectory within the application's directory. This Expressions directory is emptied when the ExpressionManager starts up.

A list of compiled modules, along with their source is maintained internally in order to reduce the overhead of starting, stopping, and copying expressions. Since no parsing is done on expressions that are entered, this does not reduce redundant compilation of expressions that differ in syntax but have the same meaning (for example, Now(1) and Now(2) would be compiled twice). This is acceptable because it takes much less time to compile an expression than it does to type one in.

The ExpressionManager marks each expression that it starts with a signature. This allows application code to ask if it started a given module.