| Vouch
Expression Builder |
 |
Please have a look at the pictures below. This is
Vouch
Expression Builder. Any expression built herewith is parsed
by the Vouch runtime engine and returns a value which may or may not be used by
the calling object to determine the action to be executed. This general
purpose expression builder is seamlessly integrated, with different objects
of Vouch. Its usage can be summarized as such: |
|
 |
To define expression for calculated fields, |
|
 |
To execute an expression with record movement in a module, |
|
 |
To define expression to be executed whenever cursor enters a field, |
|
 |
To attach a user defined column in the browser, |
|
 |
To execute an action when browser is navigated, |
|
 |
To attach columns and data from tables in reports, |
|
 |
To define pre and post expression for a report, |
|
 |
To place a user defined expression in a document, |
|
 |
and more, Basically this tool is used extensively by modules, browsers, layouts and
documents, alarms, etc. All Clipper and xBase++ functions can be used along
with Vouch Programming Language. In this
version of Vouch, commands are not supported in expression builder. However,
if need be you can call Vouch Program (
with almost the same syntax as of Clipper or xBase++ with little differences
) and which supports Vouch Commands from
within the expression builder and return value of Vouch Program will be
returned by the expression. |
|
| |
 |
|
| |
|
|
| |
 |
|
| |
|
|
| |
Hotkeys
Available |
|
 |
F4 Expd . Expand. The expression can be maximum 240
characters long and there is a limit on the screen to display entire
expression. Pressing F4 will open a window above the current one displaying
entire expression. Something like this |
|
| |

|
|
 |
F6 Func . All Vouch Functions
are listed with there brief description and parameters they receive and the
return value. Selecting one will ask you for its parameters interactively.
Vouch will build a function call on the basis of parameter values and will
post the function in the expression builder. Cursor will rest at the end of
the line. A subset of function list |
|
| |

|
|
 |
F7 Optr . Operators. A list of operators is presented for
selection. The selected operator is placed at the current cursor position.
Popup looks like this |
|
| |

|
|
 |
F10 Fields . A menu of available fields to the expression
builder will popup and selected field will be placed in the expression
buffer along with Vouch internal prefix. It is important that this prefix is
never disturbed in any manner, otherwise, Vouch will report an error at
runtime. |
|
| |

|
|
| |
Points
to be Remember while Defining Expressions
|
|
 |
If a field is called via F10, it will be
displayed something like this 7^OpBalance.
Never, never temper any part of this notation, not even the
spellings. Internally Vouch recognizes fields based on correct
notation. |
|
 |
As an expression can never be lengthy than
240 characters, and these characters are counted after translating the
resulting string to internal notation which may be smaller that what
comes to the eye, keep the expression as short as possible. Use Vouch
Progam Editor if the expression requires more functionality. Though
Vouch will report you about this fact, but at certain points Vouch may
skip this test because of the nature of macro. So try to write a
shorter macro. |
|
 |
It is not nessary to select a function with
F6. You can write is manually. The only difference will be that when
selected, Vouch will generate the resulting function call with asked
parameters. Manually you will have to place all the paramerters
yourselves. |
|
 |
Most of the time Vouch evaluates the
expression before saving and if the nature of return value does not
match with the nature the calling object expects, Vouch will flash an
error message and will allow you to edit. This will also happen if
there is some syntactical mistake, such as, mismatched brackets etc.
But in certain cases pre evaluation of macro is disabled because of
the need of calling object. Under those circumstances please ensure
that defined macro will execute properly at run time. |
|