| ListVariable | Can be either a value or @VarName (will upvar and read/write). |
| IncludePatternList | A list where each element can be used as an argument to string match. Only those elements of the input list which match at least one of the patterns may be included in the return list. |
| ExcludePatternList | A list where each element can be used as an argument to string match. Anything that matches will definitely not be included in the returned list. |
So, what you end up with is a list where every element matches some pattern in the include list and none of the patterns in the exclude list. This may be useful for processing the files in a directory, for instance.
Note that arguments of the form XxxVariable can take either a normal value or the name of a variable to read/write, prefixed by @. See About Using @ for details.
% set MyList {zero. dat one.txt two.txt special.txt}
% # Want elements that are text files, but not special.txt.
% IncludeExcludeListFilter $MyList {*.txt} {special.txt}
one.txt two.txt