callsado -- Find (user-written) ado-files called by (a)do-file
callsado filename [, path(path) sysdir(codewords) extension(.ext)]
where codewords are
UPDATES, BASE, PLUS, PERSONAL, OLDPLACE
callsado finds (user-written) ado-files called by (a)do-files. Any ado-file's name found in filename is displayed together with the line in which it is found. The program is intended for use by programmers who lost track of the user-written ados called by their (a)do-files. There is no default extension provided for filename. Type e.g. callsado foo.ado
Note that callsado does not only report ado-files actually called, but rather names of ado-files mentioned in filename. For example the line
local strip foobar
in the do-file foo.do will cause callsado to report that strip.ado is called by foo.do. The user will have to decide whether the ado-file is actually called or just mentioned. This said, keep track of the ado-files called by your programs while writing next time!
path specifies the path where filename is to be found. callsado uses findfile to locate filename.
sysdir(codewords) specifies the directories from which to obtain a list of installed ado-files. Default codewords are "PLUS PERSONAL". This option is seldom used.
extension(.ext) finds files with extension .ext. Default extension is .ado. This option is seldom used.
. callsado foo.ado . callsado foo.ado ,extension(.mata)
Partha S. Sarkar suggested this problem on Statlist.
Kit Baum made helpful comments regarding comment lines in searched files and the specification of filename.
I am very grateful to Matthew White, who suggested option path() and fixed problems caused by left single and compound double quotes and local (global) macros used in (a)do-files.
Daniel Klein, University of Bamberg, email@example.com
Online: ado, sysdir