WHICH

Purpose:

Returns the path to an SPL file or filename.

Syntax:

WHICH("splfile", verbose)

WHICH splfile

"splfile"

-

A string. The name of the SPL file to locate.

verbose

-

Optional. An integer, if 0, forces the return to be an empty string if the input is not found. If not zero, a message is returned. Defaults to 1, return message.

Returns:

A string. The full path to the file or the string Built-in Function or the string Global Macro.

Example:

which("trapz")

 

returns: DSPHOME\spl\math\trapz.spl where DSPHOME is installation directory.

Example:

which trapz

 

Same as above accept WHICH is specified in command form.

Example:

which fft

 

returns: Built-in Function since the FFT routine is built-in.

Example:

s1 = which("trapz", 0)

s2 = which("aaabbbccc", 0)

 

s1 == "DSPHOME\spl\math\trapz.spl" where DSPHOME is installation directory.

 

s2 == "" an empty string.

Remarks:

WHICH is a quick way of locating an SPL file. DADiSP automatically searches all of the directories returned by the GETSPLPATH function to locate the SPL file.

 

WHICH can also locate other files when an extension is provided, e.g.

 

which dadisp.cnf

See Also:

GETSPLPATH

HELP

VIEW

VIEWFILE