INSIGHT SOFTWARE SOLUTIONS
OTHER AUTOMATION TOOLS
ABOUT US  

 

 

Variable Evaluation Level
Kevin Heaton
Insight Software Solutions

What it does:
This macro demonstrates the Variable Evaluation Level. This feature allows the use of one variable to access another one. Consider, for example, the statement:

%T%N1%%

Without the Variable Evaluation Level feature enabled, if N1 contains 10 then the result will be %T10%. But, the content of T10 will not be accessed. The value will remain %T10%.

But, with the Variable Evaluation Level feature, you can tell Macro Express to evaluate each statement that contains a variable multiple times. Thus, in our example, the first evaluation will result in %T10% and a second evaluation will retrieve the content of %T10%.

If N1 contains 1, then this will become %T1%. If N1 contains 99, then this will become %T99%.

To install:
Download the macro file umvariableevaluationlevel.mex and save it to your hard drive. Import the macro into your existing macro file by clicking File | Import | Macros.

To use:
This macro is a sample macro. It demonstrates how to use the Variable Evaluation Level. You can run this macro from within the Macro Express Editor.

To take advantage of the Variable Evaluation Level in in your macros, study this macro to find out how it works and use the techniques in your own macros.

Because the Variable Evaluation Level feature has the potential of breaking existing macros, it is not enabled by default. To enable it, you need to enter a value in the registry. This macro has an option to do that for you.

Set the Variables Evaluation Level to a number greater than 0. I have mine set to 5 but a value of 2 may be fine for your needs. The value you set determines how many times the variable evaluation is repeated. If you have a complex statement that would require multiple passes to resolve, then you may want to set the Variables Evaluation Level to a larger number. However, problems may occur if you use a very large value.

The Variable Evaluation Level can also be set using the latest version of tweakme3.mxe. Download tweakme3.mxe from http://www.macros.com/downmore.htm.

Requirements:
Requires Macro Express v 3.5d or later

Submitted by:
Kevin Heaton
Insight Software Solutions, Inc.

Press Kit | Contact Us | Site Map | Trademarks | Privacy | What is RSS?
Copyright © 2009 Insight Software Solutions, Inc. All rights reserved.
Insight Software Solutions, Inc. Home Page Insight Software Solutions, Inc. Home Page