In Delphi's Code Editor, you can easily jump to the the declaration of an
identifier (routine
-- procedure or function, variable, constant, type,...). In the source code, right
click on the identifier (name of the routine, variable,...) and click on
Find Declaration in
the popup menu that appears.
For this feature, Delphi must know where the identifier is declared:
- The declaring unit must be mentioned in a uses clause ( either
near the top of the interface section of your unit, or near the top of the
implementation section).
For example, if you are looking for the declaration of the function
DaysInAYear then one
of the uses clause
should include DateUtils, the unit where DaysInAYear is declared:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, DateUtils;
- Delphi must have access to
the source code of the unit where the identifier is declared. For
identifiers that you declared
yourself, that's not
a problem, but for the "built-in" identifiers it depends on your
version/edition of
Delphi. Most Delphi versions have access to these source code files, but not all
of the free "Personal" editions
do (like for example D7 Personal).
If you don't know where a certain routine is declared, put the cursor on the routine
and press function key F1.
See also: Identifier Declarations.
|
|