Purpose:Remove user-defined functions from the function list

 

Format:UNFUNCTION [/Q /R file... (function ...)] function...

or

UNFUNCTION *

 

functionOne or more functions to remove from memory.
fileOne or more files from which to read functions to be undefined.

 

/Q(uiet)/R(ead file)

 

See also: FUNCTION and ESET.

 

File Completion Syntax:

 

The default filename completion syntax is: [/r] * [1*] functions

 

Usage:

 

TCC maintains a list of the functions that you have defined. The UNFUNCTION command will remove functions from that list. UNFUNCTION supports wildcards in the function name.

 

You can use regular expressions in the function name.

 

Examples:

 

To remove the function DDIR:

 

unfunction ddir

 

To remove all the functions:

 

unfunction *

 

To remove all the functions that begin with "DD":

 

unfunction dd*

 

You can delete all matching functions except for those specified by enclosing the exceptions in parentheses. For example, to remove all functions beginning with "f" except for func1 and func2:

 

unfunction (func1 func2) f*

 

If you keep functions in a file that can be loaded with the FUNCTION /R command, you can remove the functions by using the UNFUNCTION /R command with the same file name:

 

unfunction /r function.lst

 

This is much faster than removing each function individually in a batch file, and can be more selective than using UNFUNCTION *.

 

Options:

 

/QPrevents UNFUNCTION from displaying an error message if one or more of the functions does not exist. This option is most useful in batch files, for removing a group of functions when some of the functions may not have been defined.

 

/RRead the list of functions to remove from a file. The file format should be the same format as that used by the FUNCTION /R command. You can use multiple files with one UNFUNCTION /R command by placing the names on the command line, separated by spaces:

 

unfunction /r function1.lst function2.lst

 

UNFUNCTION /R will read from stdin if no filename is present and input is redirected.