Queries

Related Topics:

Restricting a Source Browsing Query Rerunning a Source Browsing Query
Fixing a Failed Source Browsing Query Special Characters in Pattern Search and Source Browsing Modes
Starting Source Browsing Searching for a Pattern

You can browse source code written in C, C++, Fortran 77, and Fortran 95 by issuing a query that instructs Sun WorkShop to find all occurrences of a program-defined symbol, string constant, or search pattern that you have specified in the Browsing Window. When the browser finds code that is identical to what is typed in the Match or Pattern text box, it is called a match. You then view the match with the surrounding source code.

In general, you cannot query for reserved words. The exception is any language-defined type names in ANSI C or C++. For example, you can query on int, float, double, or long in ANSI C or C++ programs; however, you cannot query on integer or print in Fortran programs.

You can search for a variable, function, type, constant, or macro. If you are unsure of what to browse for, begin by selecting main or another identifier used early in your program.


Note - You must have a source browsing database to use Source Browsing Mode (see Source Browsing Databases). To search without a database, use Pattern Search Mode.