Product Documentation
Cadence SKILL Development Reference
Product Version IC23.1, June 2023

listFunctions

listFunctions( 
t_pattern 
[ g_listAllFuncs ] 
) 
=> l_functions / nil

Description

Returns all public function names that contain the given substring or match the given regular expression. If the second (optional) argument is specified as t (or a non-nil value), listFunctions looks at the SKILL virtual machine, rather than the cdsFinder database, and returns all isCallable Cadence public functions and user-defined SKILL functions that contain the given substring or match the given regular expression.

By default, the source of the returned values is the SKILL directory in the SKILL Finder database, which is located in the doc hierarchy under your_install_dir/doc/finder/SKILL. listFunctions will also look in the your_install_dir/local/finder/SKILL directory, as well as directories specified in CDS_FINDER_PATH for any personal functions you may have created and placed there in the appropriate SKILL Finder format. For usage of CDS_FINDER_PATH, seeEnvironment Variable for Additional Finder Data Directories.

The returned function names can be used for passing a list of function names that match a given pattern to another function.

Arguments

t_pattern

Pattern to search for.

g_listAllFuncs

If specified as t (or a non-nil value), all isCallable Cadence public and user-defined function names that contain the given substring or match the given regular expression are returned. Default is nil.

Value Returned

l_functions

All public function names that match the given t_pattern.

nil

No functions are found that match the pattern.

Examples

Calls the tracef function with all the functions that contain the substring hi.

apply( 'tracef listFunctions( "hi" ))

Calls the tracef function with all isCallable Cadence public and user-defined functions that contain the substring x

apply( 'tracef listFunctions( "x" t ))

Lists all the functions that begin with hi

listFunctions("^hi")

Lists all the functions that begin with db and have Copy in their names.

listFunctions("^db.*Copy")

Related Topics

Debug Functions

listVariables

rexCompile

rexMatchp


Return to top
 ⠀
X