| Online Eiffel Documentation

EiffelStudio

# Introduction

The expression evaluation tool makes it possible to evaluate expressions while the application is stopped. A typical use for it is if you would like to know the result an external feature would return. Since you do not have access to the C memory of the application, doing this is impossible. You may also want to know the result of an Eiffel feature whose body is too complex for you to evaluate.

In these cases (and any other that suits you), you should use the dynamic expression evaluation. Simply define the expression and its result will be immediately available in the list of expressions.

If you keep the mouse cursor over the expression cell of line, you get a tooltip describing the expression result.

You can disable the evaluation of the selected expression by clicking on , then the context value will display 'disabled'.

If the expression has an error, or if the evaluation raised an exception, you can have better description by double-clicking on the expression row.

Caution: During the evaluation of an expression, all features that are necessary to obtain the result are called. Therefore, you should avoid calling queries that have side-effects, since doing so may alter the program execution. The Eiffel methodology recommends not to define side-effects queries anyway.

Restriction: there are a few restrictions or known issues you should be aware of :
- creation expressions are not supported (for instance "create {MY_CLASS}.make" is not supported").
- agent are not supported (for instance "agent my_function" is not supported".
for classic system:
- expression evaluation on expanded objects are not supported for now (except for basic types)
- evaluate "Precusor" will result the current feature's result (not the precursor)