Known bugs and limitations in Project Analyzer 4.1
==================================================


PLEASE NOTE THAT THIS LOOONG LIST INCLUDES MOSTLY MINOR BUGS THAT OCCUR
IN SOME SPECIAL CASES ONLY. 



I like to be honest. The truth is there are some disadvantages in the
analysis method Project Analyzer uses. The analysis method is called
static (design-time) analysis, and there are some things it can't do. 

Project Analyzer performs mostly well, but it isn't perfect. I haven't
seen any perfect analyzers, and I don't believe I ever will.


Please report any new bugs to vbshop@aivosto.com. If you can, please
attach a short code file or project to facilitate debugging. 

Some of these limitations are on a to-do list, some can't be fixed at
all. 





===========
Limitations
===========

- Project Analyzer has no known practical limit to the size of projects 
  it can handle. It has been successfully used with projects that are 
  several MB in size.
- The size of variable, constant and procedure names is restricted to 64
  characters to save some memory. Longer names are truncated.
- Super Project Analyzer can handle a group of max 50 projects at once

- There are limits to the number of references registered.

  Procedure reference limit:         Max
  From a procedure to other procs    100 calls / procedure  Fan-out

  Module reference limit:            Max
  From a module to other modules     100 refs / module      Fan-out
  To a module from other modules     200 refs / module      Fan-in

  If you are concerned if your LARGE project has met one of these
  limits, see the Metrics window for structural fan-outs = 100 or 
  structural fan-ins = 200.

  Variable, constant, Type and Enum references are not limited.


==================
Known misbehaviour
==================

- Long lines don't word wrap on some report types
- Long procedural call tree reports (All procedures) can hang the computer
- In the hypertext window, letters in DefType statements may be 
  mistaken for one-letter variable names
- In the hypertext window, if you have two different definitions with the
  same name (e.g. Form1.MyVar and Form2.MyVar), the program may
  highlight the both in red when only the other one should be highlighted
- If a local var/const has the same name as the procedure it's in, the
  procedure name will be mistaken for the var/const name in the
  Hypertext window and Project Printer. This has no effect on the
  analysis, though.
- If a procedure and a module have the same name, this can result in 
  erroneous references to the procedure instead of the module.
- Variants are classified as non-object variables, even if they contain
  an object, because there is no way to detect this at design-time.
  This may lead to minor flaws, like with the below code:

   Dim v as Variant
   Set v = Form1
   v.Caption = "This is my form"
     
  Here the last statement is considered an assignment to v, although,
  strictly speaking, it's a reference to v (and assignment to Caption). 
  Fortunately, this doesn't do much harm. If v was defined as 
  Dim v as Form (instead of Variant), the reference would be detected
  just OK.

- In the following code
  For x = 1 to 10 : Debug.Print "Hello world" : Next
  X is reported as Used only in assignment, even if it really is
  both assigned and referenced by the For...Next statement.

- If an array defined as New ObjType is later ReDim'd, the ReDim doesn't
  count as an assignment but a reference, even if the ReDim creates new
  objects in the array.
- ReDim statements without the Preserve keyword may cause Project
  Analyzer to think there is an extra local array variable. Example:

  ' (declarations)
  Dim MyArray() As Integer

  Sub MyProcedure()
  ReDim MyArray(100) As Integer

  Project Analyzer may think MyArray is a new array if 
  1) the original Dim is located in the (declarations) section of 
     another module, AND
  2) the module with Dim comes after the module with ReDim in your MAK
     or VBP file.

  The cure is to swap the order of the modules in MAK/VBP, or use 
  ReDim Preserve. There is no way in the current 2-phase architecture 
  of Project Analyzer to fix this problem.

===============================
Deficiencies in VB 3.0 features
===============================

- The Summary report shows somewhat distorted figures for 
  1. Global Name Table: Type definitions and DLLs declarations are
     not calculated correctly.
  2. Global Symbol Table: type definitions are excluded, and everything 
     else is assumed to take 10 bytes of memory.
  Use freeware VB Space (by Gregg Irwin) for more exact calculations
- Can't analyze files saved as binary. Save as text instead.


=======================
Unsupported VB features
=======================

- Line labels. If you use them, you may get incomplete results on those
  lines that have a label. Line numbers are supported. 
- The [] syntax is not fully supported. For example, in the below code,
  Dim X As Integer
  Print [X]
  the reference to variable X is not detected because of the [] syntax.

===============================
Unsupported VB 4.0/5.0 features
===============================

- Line continuation character "_"

- Late-bound references. Example:
  Forms(2).DoSomething 

  Project Analyzer can't know which form the call goes to, because 
  Forms(2) may be of any of your forms. This applies to all object
  references that are of a general type (e.g. As Form, As Object) 
  and not a specific type (As MyForm, As MyObject).

===========================
Unsupported VB 5.0 features
===========================

- Controls on UserForms (.dsr/.dsx files)
- Inherits statement (polymorphism) supported partially. A procedure that 
  implements an interface procedure is dead only if the procedure it 
  implements is also dead. That's because polymorphed calls are bound 
  finally at run-time.

==============
The FRX window
==============

- Supports the most usual data types and controls, like PictureBox.Picture,
  ListBox.List, ListBox.ItemData, TextBox.Text, MouseIcon etc.
- Some properties that are not supported (others exist):
  AniButton.Picture, SSCommand.Picture

======================
Help Compiler Warnings
======================
You can ignore the following warning in HCW.EXE (if you use RTF to Help
reports):

'HC2002: Note: 
    The keywords "xyz" and "Xyz" are identical except for case. 
    Help Workshop has modified one keyword to match the other.'


================
For best results
================

- Always declare your local variables (use Option Explicit)
- Always save your files as text (VB 3.0)
- Use MS Word as your RTF editor
- Wait for the analysis to end completely (it has 2 phases)
- VB 5.0: Project Analyzer is at its best analyzing Standard EXE 
  projects, that's what it was made for. You can of course analyze 
  ActiveX projects too, but be prepared to find some oddities.
  Report them; there are good chances they be fixed in the future.
- Use correct VB syntax. Project Analyzer relies on the correctness of
  your code. If you analyze a project that VB cannot run, you may get
  funny results.

