Generic Function Queries

The generic function query allows you to select functions by means of the following form.

Function Query

C function
Function-like macro
Writable declaration
Read-only declaration
Project scope
File scope
Defined
Sort-byMetricCompareValue
Number of characters
Number of comment characters
Number of space characters
Number of line comments
Number of block comments
Number of lines
Maximum number of characters in a line
Number of character strings
Number of unprocessed lines
Number of C preprocessor directives
Number of processed C preprocessor conditionals (ifdef, if, elif)
Number of defined C preprocessor function-like macros
Number of defined C preprocessor object-like macros
Number of preprocessed tokens
Number of compiled tokens
Number of statements or declarations
Number of operators
Number of unique operators
Number of numeric constants
Number of character literals
Number of if statements
Number of else clauses
Number of switch statements
Number of case labels
Number of default labels
Number of break statements
Number of for statements
Number of while statements
Number of do statements
Number of continue statements
Number of goto statements
Number of return statements
Number of project-scope identifiers
Number of file-scope (static) identifiers
Number of macro identifiers
Total number of object and object-like identifiers
Number of unique project-scope identifiers
Number of unique file-scope (static) identifiers
Number of unique macro identifiers
Number of unique object and object-like identifiers
Number of global namespace occupants at function's top
Number of parameters
Maximum level of statement nesting
Number of goto labels
Fan-in (number of calling functions)
Fan-out (number of called functions)
Cyclomatic complexity (control statements)
Extended cyclomatic complexity (includes branching operators)
Maximum cyclomatic complexity (includes branching operators and all switch branches)
Structure complexity (Henry and Kafura)
Halstead complexity
Information flow metric (Henry and Selig)
Entity name

Reverse sort order

Match any marked         Match all marked         Exclude marked         Exact match


Number of direct callers
Function names should ( not) match RE
Names of calling functions should ( not) match RE
Names of called functions should ( not) match RE
Select functions from filenames ( not) matching RE

Query title   

Main page — Web: Home Manual


CScout

On the top you can specify whether each function you want listed:

As is the case in file queries, next comes a series of metrics CScout collects for each defined function. For each metric (e.g. the number of comments) you can specify an operator ==, !=, < or > and a number to match that metric against. Thus to locate functions containing goto statement you would specify
Number of goto statements != 0.

On the left of each metric you can specify whether that metric will be used to sort the resulting file list. In that case, the corresponding number will appear together with each file listed. A separate option allows you to specify that files should be sorted in the reverse order.

Similarly to the identifier query, you can also specify whether the specified properties should be treated

In addition you can specify: