Macros Tab |
Ada code may contain conditional compiler instructions in pragma statements. For example:
The supported pragmas are IF, IFDEF, ELSIF, ELSE, and ENDIF. These pragmas are similar to preprocessor directives such as #ifdef in C code.
The Macros tab in the Project Configuration dialog (which you open with Project->Configure) allows you to define macros (such as DEVICE) referenced in such pragmas.
For Understand for Ada to successfully analyze your software it needs to know what macro definitions should be set.
To define macros, select the Macros tab of the Project Configuration dialog.
The Macros tab lists macros and their optional definitions. Each macro may be edited or deleted. To define a preprocessor value in the Macros tab, type the macro and any value for the macro and click Add.
Note that a macro must have a name, but that the definition is optional. Macros that are defined but have no definition value are commonly used in conjunction with PRAGMA IFDEF statements to see if macros are defined.
To change the definition of an existing macro without changing the name, select the macro, modify the definition, and press Add.
To use an existing macro as the basis for a new one, select the macro, edit the definition and the name, and press Add. This creates a new macro.
You can set a macro on the undada command line with the -define name[=value] option.
Scientific Toolworks, Inc. http://www.scitools.com |