You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtxExpression Class > TMtxExpression Properties > TMtxExpression.OnPreprocessor Property
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtxExpression.OnPreprocessor Property

The preprocessor event is called after the preprocessor has already applied any substitions and patched the parsed expression.

Syntax
C#
Visual Basic
public TOnPreprocessor OnPreprocessor;

All modifications must be made to the Expr list parameter. This is the list of lexems forming the expression. For example abc(2 + 3) is formed with 'abc', '(', '2', '+', '3', ')'. The parser already assigns the type of lexeme to each entry. May that be a variable, a constant or a function. 

This preprocessor allows you to easily parse individual expression elements further in to form understandable to the compiler. An example of the preprocessor purpose is the ability to pass spreadsheet cells or ranges to the expression parser. This expressions could be of type: A2:B3, A3, A$2:$B3 and so on. You can replace these expression with custom function specifications like: 

spreadsheet('A',2,'B',3); 

which could be hard for the user to write. The "spradsheet" function itself however still has to be declared and implemented.

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!