This is a description of the changes and new features in Pascal Analyzer version 6. The new version has been enhanced with a lot of smaller and greater features. Together they make this upgrade one of the most important in the history of Pascal Analyzer. There is now a total of 51 reports, with 197 report sections. Also there are four special multi-reports.
Support for newest Delphi versions
From version 6.1, PAL supports Delphi XE2. The current Delphi XE3 is supported from version 6.2. Support for Delphi XE4 was added in version 6.3. Of course older versions back to Borland Pascal 7 are still supported.
Relative path for main file
For the main file that is analyzed, it is now possible to use relative paths. The path is entered relative to the location of the project file itself. So, for example, if the project file is C:\PALProjects\MyProject.pap, and the main file is entered as "MyApp.dpr", PAL will look for this file in the folder C:\PALProjects. Likewise, if the main file is entered as "..\Dir\MyApp.dpr", PAL will look for the file in the C:\Dir folder. This feature is very convenient if you share PAL projects between more than one computer. Instead of specifying a main file path as "C:\Projects\MyApp.dpr", and get problems when running on another computer that has the location "D:\Projects\MyApp.dpr", you can now specify "MyApp.dpr" which will work on both computers.
New Help Report
The new Help Report checks help topics for the analyzed project's help system. Help topics are normally defined as numbers in an external *.h-file. These values correspond to values of the HelpContext property. The first report section presents a list of all HelpContext values found in DFM files. Following two sections report topics that are either missing in the *.h-file, and HelpContext values that are missing in the DFM files.
New Searched Strings Report
The new Searched Strings Report searches for strings in the project's source code files. For each search string it reports files where the strings exists, and files where they not exist. Use the report for example to verify that your source code files include a copyright notice, or common include files.
New Map File Report
The new Map File Report displays information about modules that are linked into the binary executable (EXE, DLL). It generates this information from the MAP file that can be generated for your Delphi project when compiling the source code.
Improvements in Third-Party Report
In the Third-party dependencies Report, the sort mode now has importance. The sort mode is set on the General tab page for the project options. The lists are displayed in module-identifier or identifier-module order.
Check for local variables that are referenced before being created
There is a new section in the Memory Report that reports local variables (objects) that are referenced before they are created. This is an error that in most cases will result in a runtime error.
Check for local variables that are referenced after being freed
There is a new section in the Memory Report that reports local variables (objects) that are freed, but referenced further down in the code. This is an error that in most cases will result in a runtime error.
This new section in the Warnings Report gives warnings for source code lines that are duplicated, which means that two identical lines occur right after each other. This could be a mistake in the code.
Check for local variables that are set but not read further down in the code
This is a new section in the Warnings Report that reports variables that are set, but never referenced further down in the code. It indicates some programming mistake.
Improvements in Warnings Report - Local variables that are referenced before they are set
This section in the Warnings Report has been improved. References of a variable with "SizeOf(Var)" are considered safe, and do not render an unnecessary warning.
Improvements in Warnings Report - Function result not set
This section in the Warnings Report has been improved. The detection of functions where the result has not been set, is now much more accurate.
New section in Warnings Report - Duplicate class types in except-block
This section in the Warnings Report checks if the same class type has been used more than once in an except-block, in an on-statement. It indicates some programming error.
Default report sections
Some sections in the Warnings Report, are in this version removed from the default selection of included report sections. These are the sections where the results are not certain, and where the results often are false positives. It is the sections that contain "possibly" in the name.
Improvements in Complexity Report - Complexity per module/subprogram
This section in the Complexity Report has been extended with a part listing all modules. Furthermore, the items displayed in the report can be listed in order according to LOC, Lines, etc. This is of great value for example when finding out which modules or functions that are most complex.
Improvements in Literal Strings Report
The Literal Strings Report now supports sorting of the strings. The sorting done depends on the sort mode setting in Options|Properties - General, so either the sorting will be according to module or according to the string itself.
Improvements for multi projects
All reports for multi projects have been improved. The reports now only display identifiers that are used in more than one of the analyzed projects.
New menu to check for newer version
There is a new menu command under Help, that lets PAL check if there is a newer version available. If you do not activate the option to let PAL automatically check for newer versions on startup, this is a way of doing it manually.
Close button for source viewer window
There is a new button available when the source viewer window is open. With this button you can close the window.
Customize "subprogram" string
Some of our users want to use another string than "subprogram" in the report headers. It is now possible to select another string, for example "function" or "subroutine".
New switch /D for PALCMD
This new switch lets you specify conditional defines for PALCMD, the command-line version of PAL. If present, they will override the setting in project options.
New switch /X for PALCMD
This new switch lets you specify excluded search folders for PALCMD. If present, they will override the setting in project options.
Improvements in Status Report
The Status Report now also displays total time for each report, not only parsing and report building time. It also reports user-defined environment variables, if they are found, and their translation. For example, if you have defined an environment variable "$(THIRD)", it will be displayed together with its translation "C:\3RDPARTY".
Show implementation line numbers
A new option determines if the line number where a subprogram is declared is displayed in the reports. If set to Yes, instead implementation line number is displayed. This has meaning if you double-click on the line to jump to the source code. Either it will then take you to the declaration or the implementation line. Often you would probably prefer to reach the implementation. In previous versions of PAL, the line number displayed was always for the declaration line.
The help texts have been improved and extended. For example, report codes, like "WARN12" are now displayed for each report section. These codes can be used when running PALCMD.EXE.