# Open Declaration

The Open Declaration command allows you to quickly find the declaration of a particular variable or subprogram. In the Fortran editor, click on (or select) an identifier. Then either

- click on the Navigate menu, and select Open Declaration, or
- right-click on the identifier, and, and select Open Declaration, or
- press the F3 key on your keyboard.

This feature is particularly useful when the declaration is in another file. For example, if your program contains a `CALL` statement which invokes a subroutine imported from a module in another file, invoking Open Declaration on the subroutine name in the `CALL` statement will open the module in a new editor, and the cursor will be located on the declaration of that subroutine.

# Fortran Search

Fortran Search is a syntax-aware, multi-file search tool. Unlike textual searches, Fortran Search "understands" Fortran programs. It is used to search for a particular type of declaration (e.g., only modules, or only subroutines), or it can find all of the uses of a particular variable or subroutine. It also allows to you to limit the scope of the search (e.g., it can search every file in the workspace, or just a particular project). In order to use Fortran Search, click on the Search menu and select Fortran...

This will open the Eclipse Search dialog, and the Fortran tab will be active. There, you can specify several things:

- The Search for frame allows you to specify whether it should search for subroutines, functions, modules, variables, etc.
- The Scope frame allows you to specify what file(s) will be searched.
- The Limit to frame allows you to specify whether you want to find declarations, references, or both.

Notice that only the declarations of variables/functions were found. Also note the use of the wild-card character(?) in the search box

## Wildcards

Wildcards are special symbols used for pattern matching. For more information, click on Help > Help Contents in Eclipse, and navigate to Workbench User Guide > Reference > User interface information > Search.

- * - represents any number of any symbols. For example, a search for *d would match bad, rescued, d, assembled, etc.
- ? - represents any one single character. For example, a search for ?ad would match bad, mad, sad, dad, zad, etc.

Regular expressions are an even more advanced pattern matching languages. For more information, click on Help > Help Contents in Eclipse and navigating to Workbench User Guide > Getting started > Basic tutorial > Searching