## Analyzing the Code

Once you have configured the project, Understand for C++ can parse (that is, analyze) the project. During analysis, the source files are examined and a data is stored in the Understand for C++ database.

When you save or modify the project configuration, a prompt to analyze the project appears automatically. You can also analyze the project by choosing either Project->Analyze Changed Files or Project->Analyze All Files from the menu bar.

- Analyze Changed Files - This analyzes all files that have been changed and all files that depend on those changed since the last analysis. This is also referred to as “incremental analysis.”
- Analyze All Files - This forces a full analysis of all project files, whether they have changed since the last analysis or not.

For either command, the status is reported on the Status Line and the Command Results window appears with a log of the results.

There are two phases in the analysis process: determining compilation order, and then parsing. You do not need to specify the parse order. Understand for C++ figures out the parsing order automatically. It also detects if needed source files are missing and reports this. You can optionally stop at errors, or continue, ignoring the errors.

When the analysis is complete, the source code for any errors or messages, may be examined by double-clicking on the message in the Command Results window.

To save the Command Results log to an ASCII file, select the Command Results window and choose File->Save As. Specify the location and name of the file you want to save.

After parsing, the Understand for C++ database contains lots of data to browse.

Tip: A configured project may be analyzed in batch mode using the command line program ”undc”. Refer to Using undc for details on using “undc”.

Scientific Toolworks, Inc. http://www.scitools.com